Skip to content

Commit

Permalink
[BACKLOG-6753] Fix unit tests for MDI
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderBuloichik committed Feb 25, 2016
1 parent add5072 commit 03c26ed
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -188,18 +188,18 @@ public void transParametersPassedToChildTransformation() throws KettleException
}

@Test
public void initReturnsFalseOnInaccessibleSourceStep() {
public void initReturnsTrueOnInaccessibleSourceStep() {
Map<TargetStepAttribute, SourceStepField> targetMap =
Collections.singletonMap( new TargetStepAttribute( INJECTOR_STEP_NAME, TEST_ATTR_VALUE, false ),
new SourceStepField( TEST_SOURCE_STEP_NAME, TEST_FIELD ) );
MetaInjectMeta spyMeta = spy( meta );
doReturn( targetMap ).when( spyMeta ).getTargetSourceMapping();

assertFalse( metaInject.init( spyMeta, data ) );
assertTrue( metaInject.init( spyMeta, data ) );
}

@Test
public void initReturnsFalseOnInaccessibleTargetStep() {
public void initReturnsTrueOnInaccessibleTargetStep() {
doReturn( new String[] { TEST_SOURCE_STEP_NAME } ).when( transMeta ).getPrevStepNames( any( StepMeta.class ) );

Map<TargetStepAttribute, SourceStepField> targetMap =
Expand All @@ -208,7 +208,7 @@ public void initReturnsFalseOnInaccessibleTargetStep() {
MetaInjectMeta spyMeta = spy( meta );
doReturn( targetMap ).when( spyMeta ).getTargetSourceMapping();

assertFalse( metaInject.init( spyMeta, data ) );
assertTrue( metaInject.init( spyMeta, data ) );
}

@Test
Expand Down

0 comments on commit 03c26ed

Please sign in to comment.