Search in sources :

Example 1 with TestConfiguration

use of teetime.framework.TestConfiguration in project TeeTime by teetime-framework.

the class IntraStageCollectorTest method testVisitedStages.

@Test
public void testVisitedStages() {
    TestConfiguration config = new TestConfiguration();
    IntraStageCollector collector = new IntraStageCollector(config.init);
    Traverser traversor = new Traverser(collector);
    traversor.traverse(config.init);
    assertThat(collector.getIntraStages(), containsInAnyOrder(config.init, config.f2b, config.distributor));
}
Also used : Traverser(teetime.framework.Traverser) TestConfiguration(teetime.framework.TestConfiguration) Test(org.junit.Test)

Example 2 with TestConfiguration

use of teetime.framework.TestConfiguration in project TeeTime by teetime-framework.

the class A1ThreadableStageCollectorTest method testVisit.

@Test
public void testVisit() throws Exception {
    TestConfiguration config = new TestConfiguration();
    Collection<AbstractStage> startStages = ConfigurationFacade.INSTANCE.getStartStages(config);
    A1ThreadableStageCollector stageCollector = new A1ThreadableStageCollector();
    Traverser traversor = new Traverser(stageCollector);
    for (AbstractStage startStage : startStages) {
        traversor.traverse(startStage);
    }
    Set<AbstractStage> newThreadableStages = stageCollector.getThreadableStages();
    assertThat(newThreadableStages, hasSize(4));
}
Also used : Traverser(teetime.framework.Traverser) TestConfiguration(teetime.framework.TestConfiguration) AbstractStage(teetime.framework.AbstractStage) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 TestConfiguration (teetime.framework.TestConfiguration)2 Traverser (teetime.framework.Traverser)2 AbstractStage (teetime.framework.AbstractStage)1