Examples of MockRequestContext


Examples of eu.admire.gateway.location.MockRequestContext

            "PE(<Connection in> => <Connection out>) B = PE(<Connection in=d.in> => <Connection out=e.out>);" +
            "register B;";
        registry.registerProcessingElement(desc, implementation);
        insert.setAdmireRegistry(registry);
        insert.setDispelOptimiser(new SimpleDispelOptimiser());
        RequestContext context = new MockRequestContext();
        Graph graph = new Graph();
        ProcessingElementNode a = new ProcessingElementNode("eu.admire.A");
        ProcessingElementNode b = new ProcessingElementNode("B");
        b.connectInput("in", 0, a.getOutput("out", 0));
        ProcessingElementNode c = new ProcessingElementNode("eu.admire.C");
View Full Code Here

Examples of org.apache.jetspeed.mockobjects.request.MockRequestContext

     */
    private PortalSiteRequestContext getMockPortalSiteRequestContext(User user, Locale locale, String serverName) throws Exception
    {
        // setup profiler and portal site to determine template
        // folders paths generate mock request for new user to profile
        RequestContext request = new MockRequestContext("/");
        request.setSubject(userManager.getSubject(user));
        request.setLocale((locale != null) ? locale : Locale.getDefault());
        MockHttpServletRequest servletRequest = new MockHttpServletRequest();
        if (serverName != null)
        {
            servletRequest.setServerName(serverName);
        }
        request.setRequest(servletRequest);

        // get profile locators map for new user request, (taken from
        // ProfilerValveImpl)
        Map locators = profiler.getProfileLocators(request , user);
        if (locators.size() == 0)
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.MockRequestContext

  }

  @Override
  protected void setUp() throws Exception
  {
    _mockRequestContext = new MockRequestContext();
    super.setUp();
  }
View Full Code Here

Examples of org.springframework.webflow.test.MockRequestContext

public class ActionResultExposerTests extends TestCase {

  public void testEvaluateExpressionResult() throws Exception {
    StaticExpression resultExpression = new StaticExpression("");
    ActionResultExposer exposer = new ActionResultExposer(resultExpression, null, null);
    MockRequestContext context = new MockRequestContext();
    exposer.exposeResult("foo", context);
    assertEquals("foo", resultExpression.getValue(null));
  }
View Full Code Here

Examples of org.springframework.webflow.test.MockRequestContext

  }

  public void testEvaluateExpressionNullResult() throws Exception {
    StaticExpression resultExpression = new StaticExpression("");
    ActionResultExposer exposer = new ActionResultExposer(resultExpression, null, null);
    MockRequestContext context = new MockRequestContext();
    exposer.exposeResult(null, context);
    assertEquals(null, resultExpression.getValue(null));
  }
View Full Code Here

Examples of org.springframework.webflow.test.MockRequestContext

  public void testEvaluateExpressionResultExposerWithTypeConversion() throws Exception {
    StaticExpression resultExpression = new StaticExpression("");
    ActionResultExposer exposer = new ActionResultExposer(resultExpression, Integer.class,
        new DefaultConversionService());
    MockRequestContext context = new MockRequestContext();
    exposer.exposeResult("3", context);
    assertEquals(new Integer(3), resultExpression.getValue(null));
  }
View Full Code Here

Examples of org.springframework.webflow.test.MockRequestContext

    } catch (IllegalArgumentException e) {
    }
  }

  public void testNegation() {
    assertFalse(new NotTransitionCriteria(WildcardTransitionCriteria.INSTANCE).test(new MockRequestContext()));
  }
View Full Code Here

Examples of org.springframework.webflow.test.MockRequestContext

  private TransitionCriteriaChain chain;
  private MockRequestContext context;

  protected void setUp() throws Exception {
    chain = new TransitionCriteriaChain();
    context = new MockRequestContext();
  }
View Full Code Here

Examples of org.springframework.webflow.test.MockRequestContext

public class SecurityFlowExecutionListenerTests extends TestCase {

  public void testSessionCreatingNoSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    FlowDefinition definition = new Flow("flow");
    listener.sessionCreating(context, definition);
  }
View Full Code Here

Examples of org.springframework.webflow.test.MockRequestContext

    listener.sessionCreating(context, definition);
  }

  public void testSessionCreatingWithSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    Flow flow = new Flow("flow");
    SecurityRule rule = getSecurityRuleAnyAuthorized();
    ((LocalAttributeMap) flow.getAttributes()).put(SecurityRule.SECURITY_ATTRIBUTE_NAME, rule);
    configureSecurityContext();
    listener.sessionCreating(context, flow);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.