From d1eebc8bef10b841e73b7e8ed1577c4aafd48a28 Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sun, 8 Sep 2019 01:54:03 +0530 Subject: [PATCH] [BAEL-15393] - Fixed tests --- .../com/baeldung/SpringContextIntegrationTest.java | 11 ++++------- .../src/test/java/com/baeldung/SpringContextTest.java | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/spring-mvc-java/src/test/java/com/baeldung/SpringContextIntegrationTest.java b/spring-mvc-java/src/test/java/com/baeldung/SpringContextIntegrationTest.java index 4c06917325..ae91d4dc1e 100644 --- a/spring-mvc-java/src/test/java/com/baeldung/SpringContextIntegrationTest.java +++ b/spring-mvc-java/src/test/java/com/baeldung/SpringContextIntegrationTest.java @@ -3,15 +3,12 @@ package com.baeldung; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.support.AnnotationConfigContextLoader; -import org.springframework.test.context.web.WebAppConfiguration; +import org.springframework.test.context.junit4.SpringRunner; -import com.baeldung.config.AppInitializer; +import com.baeldung.config.TestConfig; -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = { AppInitializer.class }, loader = AnnotationConfigContextLoader.class) -@WebAppConfiguration +@RunWith(SpringRunner.class) +@ContextConfiguration(classes = {TestConfig.class}) public class SpringContextIntegrationTest { @Test diff --git a/spring-mvc-java/src/test/java/com/baeldung/SpringContextTest.java b/spring-mvc-java/src/test/java/com/baeldung/SpringContextTest.java index 9777addb61..8943ecb548 100644 --- a/spring-mvc-java/src/test/java/com/baeldung/SpringContextTest.java +++ b/spring-mvc-java/src/test/java/com/baeldung/SpringContextTest.java @@ -3,15 +3,12 @@ package com.baeldung; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.support.AnnotationConfigContextLoader; -import org.springframework.test.context.web.WebAppConfiguration; +import org.springframework.test.context.junit4.SpringRunner; -import com.baeldung.config.AppInitializer; +import com.baeldung.config.TestConfig; -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = { AppInitializer.class }, loader = AnnotationConfigContextLoader.class) -@WebAppConfiguration +@RunWith(SpringRunner.class) +@ContextConfiguration(classes = {TestConfig.class}) public class SpringContextTest { @Test