@Test public void testSelect() { final Event event = action.execute(src); Assert.assertEquals(c14nCtx.getAttemptedFlow(), c14nCtx.getPotentialFlows().get(event.getId())); Assert.assertEquals(c14nCtx.getAttemptedFlow().getId(), "test1"); }
@Test public void testIntermediate() { c14nCtx.getIntermediateFlows().put("test1", c14nCtx.getPotentialFlows().get("test1")); final Event event = action.execute(src); Assert.assertEquals(c14nCtx.getAttemptedFlow(), c14nCtx.getPotentialFlows().get(event.getId())); Assert.assertEquals(c14nCtx.getAttemptedFlow().getId(), "test2"); }
@BeforeMethod public void setUp() throws Exception { super.setUp(); action = new SelectSubjectCanonicalizationFlow(); action.initialize(); c14nCtx = prc.getSubcontext(SubjectCanonicalizationContext.class, false); }
@Test public void testPredicate() { c14nCtx .getPotentialFlows() .get("test1") .setActivationCondition(Predicates.<ProfileRequestContext>alwaysFalse()); final Event event = action.execute(src); Assert.assertEquals(c14nCtx.getAttemptedFlow(), c14nCtx.getPotentialFlows().get(event.getId())); Assert.assertEquals(c14nCtx.getAttemptedFlow().getId(), "test2"); }