/** * Create an instance of {@link ExecEachSegmentSequenceType } * */ public ExecEachSegmentSequenceType createExecEachSegmentSequenceType() { return new ExecEachSegmentSequenceType(); }
/** * Create an instance of {@link ExecEachSegmentSequenceType } * */ public ExecEachSegmentSequenceType createExecEachSegmentSequenceType() { return new ExecEachSegmentSequenceType(); }
@Test public void testOperationSkipped() { SkipOperationResolver resolver = new SkipOperationResolver(new TemplateParameterResolver(contextProvider)); ConditionalSimpleType falseExec = new ExecOnceType(); falseExec.setIf("false"); ConditionalSimpleType ifParamExec = new ExecOnceType(); ifParamExec.setIf("%{dynamic.falseParam}"); ConditionalComplexType unlessParamExec = new ExecEachSequenceType(); unlessParamExec.setUnless("%{dynamic.trueParam}"); ConditionalComplexType ifUnlessParamExec = new ExecEachSegmentSequenceType(); ifUnlessParamExec.setIf("%{dynamic.trueParam}"); // not skipped ifUnlessParamExec.setUnless("%{dynamic.trueParam}"); // skipped assertTrue(resolver.setContextInfo(ContextInfo.EMPTY).isSkip(falseExec)); assertTrue(resolver.setContextInfo(ContextInfo.EMPTY).isSkip(ifParamExec)); assertTrue(resolver.setContextInfo(ContextInfo.EMPTY).isSkip(unlessParamExec)); assertTrue(resolver.setContextInfo(ContextInfo.EMPTY).isSkip(ifUnlessParamExec)); }
@Test public void testOperationNotSkipped() { SkipOperationResolver resolver = new SkipOperationResolver(new TemplateParameterResolver(contextProvider)); ConditionalSimpleType trueExec = new ExecOnceType(); trueExec.setUnless("false"); ConditionalSimpleType ifParamExec = new ExecOnceType(); ifParamExec.setIf("%{dynamic.trueParam}"); ConditionalComplexType unlessParamExec = new ExecEachSequenceType(); unlessParamExec.setUnless("%{dynamic.falseParam}"); ConditionalComplexType ifUnlessParamExec = new ExecEachSegmentSequenceType(); ifUnlessParamExec.setIf("%{dynamic.trueParam}"); ifUnlessParamExec.setUnless("%{dynamic.falseParam}"); assertFalse(resolver.setContextInfo(ContextInfo.EMPTY).isSkip(trueExec)); assertFalse(resolver.setContextInfo(ContextInfo.EMPTY).isSkip(ifParamExec)); assertFalse(resolver.setContextInfo(ContextInfo.EMPTY).isSkip(unlessParamExec)); assertFalse(resolver.setContextInfo(ContextInfo.EMPTY).isSkip(ifUnlessParamExec)); }