diff --git a/spring-test/src/test/java/org/springframework/test/context/support/DelegatingSmartContextLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/support/DelegatingSmartContextLoaderTests.java index dc9121085b..21a32e3714 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/DelegatingSmartContextLoaderTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/DelegatingSmartContextLoaderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,14 +54,14 @@ public class DelegatingSmartContextLoaderTests { @Test(expected = IllegalStateException.class) public void processContextConfigurationWithoutLocationsAndConfigurationClassesForBogusTestClass() { ContextConfigurationAttributes configAttributes = new ContextConfigurationAttributes(getClass(), - EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, true, ContextLoader.class); + EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, true, null, true, ContextLoader.class); loader.processContextConfiguration(configAttributes); } @Test public void processContextConfigurationWithDefaultXmlConfigGeneration() { ContextConfigurationAttributes configAttributes = new ContextConfigurationAttributes(XmlTestCase.class, - EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, true, ContextLoader.class); + EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, true, null, true, ContextLoader.class); loader.processContextConfiguration(configAttributes); assertEquals(1, configAttributes.getLocations().length); assertEmpty(configAttributes.getClasses()); @@ -70,7 +70,7 @@ public class DelegatingSmartContextLoaderTests { @Test public void processContextConfigurationWithDefaultConfigurationClassGeneration() { ContextConfigurationAttributes configAttributes = new ContextConfigurationAttributes(ConfigClassTestCase.class, - EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, true, ContextLoader.class); + EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, true, null, true, ContextLoader.class); loader.processContextConfiguration(configAttributes); assertEquals(1, configAttributes.getClasses().length); assertEmpty(configAttributes.getLocations()); @@ -79,8 +79,8 @@ public class DelegatingSmartContextLoaderTests { @Test(expected = IllegalStateException.class) public void processContextConfigurationWithDefaultXmlConfigAndConfigurationClassGeneration() { ContextConfigurationAttributes configAttributes = new ContextConfigurationAttributes( - ImproperDuplicateDefaultXmlAndConfigClassTestCase.class, EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, true, - ContextLoader.class); + ImproperDuplicateDefaultXmlAndConfigClassTestCase.class, EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, true, null, + true, ContextLoader.class); loader.processContextConfiguration(configAttributes); } @@ -88,7 +88,7 @@ public class DelegatingSmartContextLoaderTests { public void processContextConfigurationWithLocation() { String[] locations = new String[] { "classpath:/foo.xml" }; ContextConfigurationAttributes configAttributes = new ContextConfigurationAttributes(getClass(), locations, - EMPTY_CLASS_ARRAY, true, ContextLoader.class); + EMPTY_CLASS_ARRAY, true, null, true, ContextLoader.class); loader.processContextConfiguration(configAttributes); assertArrayEquals(locations, configAttributes.getLocations()); assertEmpty(configAttributes.getClasses()); @@ -98,7 +98,7 @@ public class DelegatingSmartContextLoaderTests { public void processContextConfigurationWithConfigurationClass() { Class[] classes = new Class[] { getClass() }; ContextConfigurationAttributes configAttributes = new ContextConfigurationAttributes(getClass(), - EMPTY_STRING_ARRAY, classes, true, ContextLoader.class); + EMPTY_STRING_ARRAY, classes, true, null, true, ContextLoader.class); loader.processContextConfiguration(configAttributes); assertArrayEquals(classes, configAttributes.getClasses()); assertEmpty(configAttributes.getLocations()); diff --git a/spring-test/src/test/java/org/springframework/test/context/support/PrivateConfigInnerClassTestCase.java b/spring-test/src/test/java/org/springframework/test/context/support/PrivateConfigInnerClassTestCase.java index ad90a74067..d6e387be05 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/PrivateConfigInnerClassTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/PrivateConfigInnerClassTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 the original author or authors. + * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,6 @@ import org.springframework.context.annotation.Configuration; public class PrivateConfigInnerClassTestCase { // Intentionally private - @SuppressWarnings("unused") @Configuration private static class PrivateConfig { } diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java index 7d956ee6f9..ab61dc2bc5 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,6 +53,7 @@ public class DirtiesContextTransactionalTestNGSpringContextTests extends Abstrac private ApplicationContext dirtiedApplicationContext; + @SuppressWarnings("deprecation") private void performCommonAssertions() { assertInTransaction(true); assertNotNull(super.applicationContext,