Search in sources :

Example 1 with PipelineState

use of fr.inria.spirals.repairnator.states.PipelineState in project repairnator by Spirals-Team.

the class TestAbstractStep method testSetStateWillGiveStateToOtherSteps.

@Test
public void testSetStateWillGiveStateToOtherSteps() {
    ProjectInspector mockInspector = mock(ProjectInspector.class);
    JobStatus jobStatus = new JobStatus("");
    when(mockInspector.getJobStatus()).thenReturn(jobStatus);
    AbstractStep step1 = new AbstractStepNop(mockInspector);
    AbstractStep step2 = new AbstractStepNop(mockInspector);
    AbstractStep step3 = new AbstractStepNop(mockInspector);
    PipelineState state = PipelineState.NOTFAILING;
    step1.setNextStep(step2).setNextStep(step3);
    step1.setPipelineState(state);
    assertThat(step3.getPipelineState(), is(state));
}
Also used : JobStatus(fr.inria.spirals.repairnator.process.inspectors.JobStatus) PipelineState(fr.inria.spirals.repairnator.states.PipelineState) ProjectInspector(fr.inria.spirals.repairnator.process.inspectors.ProjectInspector) Test(org.junit.Test)

Aggregations

JobStatus (fr.inria.spirals.repairnator.process.inspectors.JobStatus)1 ProjectInspector (fr.inria.spirals.repairnator.process.inspectors.ProjectInspector)1 PipelineState (fr.inria.spirals.repairnator.states.PipelineState)1 Test (org.junit.Test)1