本文整理汇总了Java中org.pentaho.di.trans.TransHopMeta.setErrorHop方法的典型用法代码示例。如果您正苦于以下问题:Java TransHopMeta.setErrorHop方法的具体用法?Java TransHopMeta.setErrorHop怎么用?Java TransHopMeta.setErrorHop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.trans.TransHopMeta
的用法示例。
在下文中一共展示了TransHopMeta.setErrorHop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testMouseUpHopGetsSelected
import org.pentaho.di.trans.TransHopMeta; //导入方法依赖的package包/类
@Test
public void testMouseUpHopGetsSelected() {
MouseEvent event = mock( MouseEvent.class );
int x = 0, y = 0;
TransGraph transGraph = mock( TransGraph.class );
StepMeta stepMeta = mock( StepMeta.class );
StepErrorMeta errorMeta = new StepErrorMeta( null, null );
TransHopMeta selectedHop = new TransHopMeta();
selectedHop.setErrorHop( true );
selectedHop.setEnabled( TRUE_RESULT );
selectedHop.setFromStep( stepMeta );
when( stepMeta.getStepErrorMeta() ).thenReturn( errorMeta );
when( transGraph.findHop( x, y ) ).thenReturn( selectedHop );
when( transGraph.screen2real( any( Integer.class ), any( Integer.class ) ) ).thenReturn( new Point( x, y ) );
doCallRealMethod().when( transGraph ).mouseUp( event );
transGraph.mouseUp( event );
Assert.assertTrue( errorMeta.isEnabled() );
}
示例2: testEnableHopGetsSelected
import org.pentaho.di.trans.TransHopMeta; //导入方法依赖的package包/类
@Test
public void testEnableHopGetsSelected() {
TransGraph transGraph = mock( TransGraph.class );
doCallRealMethod().when( transGraph ).setTransMeta( any( TransMeta.class ) );
doCallRealMethod().when( transGraph ).setSpoon( any( Spoon.class ) );
transGraph.setTransMeta( new TransMeta() );
transGraph.setSpoon( mock( Spoon.class ) );
StepMeta stepMeta = mock( StepMeta.class );
StepErrorMeta errorMeta = new StepErrorMeta( null, null );
TransHopMeta selectedHop = new TransHopMeta();
selectedHop.setErrorHop( true );
selectedHop.setEnabled( false );
selectedHop.setFromStep( stepMeta );
when( stepMeta.getStepErrorMeta() ).thenReturn( errorMeta );
StepMeta toStep = new StepMeta();
toStep.setName( "toStep" );
selectedHop.setToStep( toStep );
when( transGraph.getCurrentHop() ).thenReturn( selectedHop );
doCallRealMethod().when( transGraph ).enableHop();
transGraph.enableHop();
Assert.assertTrue( errorMeta.isEnabled() );
}