committed by
GitHub
parent
213a6e2bf2
commit
7ee3e57727
+6
-8
@@ -14,23 +14,21 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import static com.baeldung.serenity.spring.RandomNumberUtil.randomInt;
|
||||
import static org.springframework.test.annotation.DirtiesContext.ClassMode.AFTER_CLASS;
|
||||
|
||||
/**
|
||||
* @author aiet
|
||||
*/
|
||||
|
||||
@RunWith(Suite.class)
|
||||
@Suite.SuiteClasses({
|
||||
AdderClassDirtiesContextIntegrationTest.DirtiesContextTest.class, AdderClassDirtiesContextIntegrationTest.AnotherDirtiesContextTest.class
|
||||
})
|
||||
AdderClassDirtiesContextIntegrationTest.DirtiesContextTest.class, AdderClassDirtiesContextIntegrationTest.AnotherDirtiesContextTest.class
|
||||
})
|
||||
public class AdderClassDirtiesContextIntegrationTest {
|
||||
|
||||
@RunWith(SerenityRunner.class)
|
||||
@ContextConfiguration(classes = AdderService.class)
|
||||
public static abstract class Base {
|
||||
|
||||
@Steps AdderServiceSteps adderServiceSteps;
|
||||
@Steps
|
||||
AdderServiceSteps adderServiceSteps;
|
||||
|
||||
@ClassRule public static SpringIntegrationClassRule springIntegrationClassRule = new SpringIntegrationClassRule();
|
||||
@ClassRule
|
||||
public static SpringIntegrationClassRule springIntegrationClassRule = new SpringIntegrationClassRule();
|
||||
|
||||
void whenAccumulate_thenSummedUp() {
|
||||
adderServiceSteps.whenAccumulate();
|
||||
|
||||
@@ -6,13 +6,11 @@ import org.jbehave.core.annotations.BeforeStory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
/**
|
||||
* @author aiet
|
||||
*/
|
||||
@ContextConfiguration(classes = { AdderController.class, AdderService.class })
|
||||
@ContextConfiguration(classes = {AdderController.class, AdderService.class})
|
||||
public class AdderTest extends SerenityStory {
|
||||
|
||||
@Autowired private AdderService adderService;
|
||||
@Autowired
|
||||
private AdderService adderService;
|
||||
|
||||
@BeforeStory
|
||||
public void init() {
|
||||
|
||||
Reference in New Issue
Block a user