Updated tests to remove deprecated code from tests
* cleanup removing unused headers * Updated asserts in code base that needed messages (marked as deprecated) * left one test that was testing a deprecated constructor. When that code is removed we can remove that test. * some other cleanup resolves #338
This commit is contained in:
committed by
Michael Minella
parent
c4324b550d
commit
3ad9efe3fe
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.test.util.EnvironmentTestUtils;
|
||||
import org.springframework.boot.test.util.TestPropertyValues;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -32,7 +32,8 @@ public class TimestampTaskPropertiesTests {
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testEmptyFormat() {
|
||||
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
|
||||
EnvironmentTestUtils.addEnvironment(context, "format:");
|
||||
TestPropertyValues testPropertyValues = TestPropertyValues.of("format:");
|
||||
testPropertyValues.applyTo(context);
|
||||
context.register(Conf.class);
|
||||
context.refresh();
|
||||
TimestampTaskProperties properties = context.getBean(TimestampTaskProperties.class);
|
||||
|
||||
Reference in New Issue
Block a user