Skip to content

Commit

Permalink
Fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Jun 12, 2015
1 parent 5f70792 commit 9bcce8b
Showing 1 changed file with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Copyright Microsoft Corporation
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -24,14 +24,24 @@
import org.junit.Test;

import com.microsoft.windowsazure.tracing.CloudTracing;
import java.util.Locale;
import org.junit.AfterClass;
import org.junit.BeforeClass;

public class JavaTracingInterceptorTest {

private static Locale locale;

public class JavaTracingInterceptorTest
{
private ByteArrayOutputStream logContent;


@BeforeClass
public static void setUSLocale() {
locale = Locale.getDefault();
Locale.setDefault(Locale.US);
}

@Test
public void testInformationSendRequest()
{
public void testInformationSendRequest() {
// Arrange
logContent = new ByteArrayOutputStream();
System.setErr(new PrintStream(logContent));
Expand All @@ -55,4 +65,9 @@ public void testInformationSendRequest()
result = logContent.toString();
assertTrue(result.contains("INFO: hello there"));
}

@AfterClass
public static void restoreLocale() {
Locale.setDefault(locale);
}
}

0 comments on commit 9bcce8b

Please sign in to comment.