Examples of ServletExternalContext


Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        this.context = new MockRequestContext();
    }

    @Test
    public void testNoTgtToSet() throws Exception {
        this.context.setExternalContext(new ServletExternalContext(new MockServletContext(), new MockHttpServletRequest(), new MockHttpServletResponse()));
       
        assertEquals("success", this.action.execute(this.context).getId());
    }
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

    public void testTgtToSet() throws Exception {
        final MockHttpServletResponse response = new MockHttpServletResponse();
        final String TICKET_VALUE = "test";
       
        WebUtils.putTicketGrantingTicketInRequestScope(this.context, TICKET_VALUE);
        this.context.setExternalContext(new ServletExternalContext(new MockServletContext(), new MockHttpServletRequest(), response));
       
        assertEquals("success", this.action.execute(this.context).getId());
        assertEquals(TICKET_VALUE, response.getCookies()[0].getValue());
    }
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        final MockHttpServletResponse response = new MockHttpServletResponse();
        final MockHttpServletRequest request = new MockHttpServletRequest();
        final String TICKET_VALUE = "test";
        request.setCookies(new Cookie[] {new Cookie("TGT", "test5")});
        WebUtils.putTicketGrantingTicketInRequestScope(this.context, TICKET_VALUE);
        this.context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, response));
       
        assertEquals("success", this.action.execute(this.context).getId());
        assertEquals(TICKET_VALUE, response.getCookies()[0].getValue());
    }
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        final MockRequestContext context = new MockRequestContext();

        request.addParameter("username", "test");
        request.addParameter("password", "test");

        context.setExternalContext(new ServletExternalContext(
            new MockServletContext(), request, new MockHttpServletResponse()));
        context.getRequestScope().put("credentials",
            TestUtils.getCredentialsWithSameUsernameAndPassword());
//        this.action.bind(context);
//        assertEquals("success", this.action.submit(context).getId());
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        request.addParameter("username", "test");
        request.addParameter("password", "test");
        request.addParameter("warn", "true");

        context.setExternalContext(new ServletExternalContext(
            new MockServletContext(), request, response));
        context.getRequestScope().put("credentials",
            TestUtils.getCredentialsWithSameUsernameAndPassword());
  //      this.action.bind(context);
   //     assertEquals("success", this.action.submit(context).getId());
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        request.addParameter("username", "test");
        request.addParameter("password", "test");
        request.addParameter("warn", "true");
        request.addParameter("service", "test");

        context.setExternalContext(new ServletExternalContext(
            new MockServletContext(), request, response));
        context.getRequestScope().put("credentials",
            TestUtils.getCredentialsWithSameUsernameAndPassword());
//       this.action.bind(context);
//       assertEquals("success", this.action.submit(context).getId());
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        final MockRequestContext context = new MockRequestContext();

        request.addParameter("username", "test");
        request.addParameter("password", "test2");

        context.setExternalContext(new ServletExternalContext(
            new MockServletContext(), request, new MockHttpServletResponse()));

        context.getRequestScope().put("credentials",
            TestUtils.getCredentialsWithDifferentUsernameAndPassword());
        context.getRequestScope().put(
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        request.addParameter("renew", "true");
        request.addParameter("service", "test");
        request.addParameter("username", "test");
        request.addParameter("password", "test");
       
        context.setExternalContext(new ServletExternalContext(
            new MockServletContext(), request, new MockHttpServletResponse()));
        context.getFlowScope().put("service", TestUtils.getService("test"));
    //    this.action.bind(context);
     //   assertEquals("warn", this.action.submit(context).getId());
    }
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        request.addParameter("renew", "true");
        request.addParameter("service", "test");
        request.addParameter("username", "test2");
        request.addParameter("password", "test2");

        context.setExternalContext(new ServletExternalContext(
            new MockServletContext(), request, new MockHttpServletResponse()));
    //    this.action.bind(context);

    //    assertEquals("success", this.action.submit(context).getId());
    }
View Full Code Here

Examples of org.springframework.webflow.context.servlet.ServletExternalContext

        context.getFlowScope().put("ticketGrantingTicketId", ticketGrantingTicket);
        request.addParameter("renew", "true");
        request.addParameter("service", "test");

        context.setExternalContext(new ServletExternalContext(
            new MockServletContext(), request, new MockHttpServletResponse()));
        context.getRequestScope().put("credentials",
            TestUtils.getCredentialsWithDifferentUsernameAndPassword());
        context.getRequestScope().put(
            "org.springframework.validation.BindException.credentials",
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.