Convert all sample tests to @IntegrationTest where appropriate

Makes them a lot more readable IMO, and also enables @Autowiring
from the context into the test case (sweeet). I added @DirtiesContext
to all of them as well to be on the safe side, but possbly that can be
optimized in some way as well.
This commit is contained in:
Dave Syer
2014-03-11 13:54:30 +00:00
parent 123457a588
commit 7a285cf65d
40 changed files with 1361 additions and 1534 deletions

View File

@@ -18,8 +18,7 @@ package sample.simple;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationContextLoader;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
@@ -28,7 +27,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
* @author Dave Syer
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SampleSimpleApplication.class, loader = SpringApplicationContextLoader.class)
@SpringApplicationConfiguration(classes = SampleSimpleApplication.class)
public class SpringTestSampleSimpleApplicationTests {
@Test