From 4ec91c47c321fd390c88f67e762d93638c97b8af Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 5 Jul 2009 21:29:28 +0000 Subject: [PATCH] Polishing: suppressing warnings. git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1470 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../test/context/TestContextManagerTests.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/org.springframework.test/src/test/java/org/springframework/test/context/TestContextManagerTests.java b/org.springframework.test/src/test/java/org/springframework/test/context/TestContextManagerTests.java index 936116adb74..5fb0436e938 100644 --- a/org.springframework.test/src/test/java/org/springframework/test/context/TestContextManagerTests.java +++ b/org.springframework.test/src/test/java/org/springframework/test/context/TestContextManagerTests.java @@ -31,15 +31,14 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; - -import org.springframework.test.context.support.AbstractTestExecutionListener; import org.springframework.core.style.ToStringCreator; +import org.springframework.test.context.support.AbstractTestExecutionListener; /** - * JUnit 4 based unit test for {@link TestContextManager}, which verifies - * proper execution order of registered - * {@link TestExecutionListener TestExecutionListeners}. - * + * JUnit 4 based unit test for {@link TestContextManager}, which verifies proper + * execution order of registered {@link TestExecutionListener + * TestExecutionListeners}. + * * @author Sam Brannen * @since 2.5 */ @@ -58,10 +57,10 @@ public class TestContextManagerTests { /** - * Asserts the execution order of 'before' and 'after' test - * method calls on {@link TestExecutionListener listeners} registered for - * the configured {@link TestContextManager}. - * + * Asserts the execution order of 'before' and 'after' test method + * calls on {@link TestExecutionListener listeners} registered for the + * configured {@link TestContextManager}. + * * @see #beforeTestMethodCalls * @see #afterTestMethodCalls */ @@ -85,9 +84,9 @@ public class TestContextManagerTests { } assertTrue("Verifying execution order of 'before' listeners' (" + usageContext + ").", - expectedBeforeTestMethodCalls.equals(beforeTestMethodCalls)); + expectedBeforeTestMethodCalls.equals(beforeTestMethodCalls)); assertTrue("Verifying execution order of 'after' listeners' (" + usageContext + ").", - expectedAfterTestMethodCalls.equals(afterTestMethodCalls)); + expectedAfterTestMethodCalls.equals(afterTestMethodCalls)); } @BeforeClass @@ -104,7 +103,7 @@ public class TestContextManagerTests { @AfterClass public static void verifyListenerExecutionOrderAfterClass() throws Exception { assertExecutionOrder(Arrays. asList(FIRST, SECOND, THIRD), - Arrays. asList(THIRD, SECOND, FIRST), "AfterClass"); + Arrays. asList(THIRD, SECOND, FIRST), "AfterClass"); } @Before @@ -113,10 +112,10 @@ public class TestContextManagerTests { final Method testMethod = ExampleTestCase.class.getDeclaredMethod("exampleTestMethod", (Class[]) null); this.testContextManager = new TestContextManager(ExampleTestCase.class); this.testContextManager.registerTestExecutionListeners(new NamedTestExecutionListener(FIRST), - new NamedTestExecutionListener(SECOND), new NamedTestExecutionListener(THIRD)); + new NamedTestExecutionListener(SECOND), new NamedTestExecutionListener(THIRD)); assertEquals("Verifying the number of registered TestExecutionListeners.", 6, - this.testContextManager.getTestExecutionListeners().size()); + this.testContextManager.getTestExecutionListeners().size()); this.testContextManager.beforeTestMethod(new ExampleTestCase(), testMethod); } @@ -124,7 +123,7 @@ public class TestContextManagerTests { /** * Verifies the expected {@link TestExecutionListener} * execution order within a test method. - * + * * @see #verifyListenerExecutionOrderAfterClass() */ @Test @@ -143,6 +142,7 @@ public class TestContextManagerTests { @ContextConfiguration private static class ExampleTestCase { + @SuppressWarnings("unused") public void exampleTestMethod() { assertTrue(true); }