Package foo.domaintest.action

Examples of foo.domaintest.action.Response


  @Mock Metrics metrics;

  @Test
  public void testIntegration() throws Exception {
    StashAction stash = new StashAction();
    stash.response = new Response(sleeper, servletResponse, metrics);
    stash.memcache = new Memcache(null, metrics);
    StringWriter stashWriter = new StringWriter();
    when(servletResponse.getWriter()).thenReturn(new PrintWriter(stashWriter));
    stash.tempUrlFactory = new TempUrlFactory("http://testing.example/stash");
    stash.lazyRandomToken = lazy("token");
    stash.status = 234;
    stash.payload = "foo";
    stash.run();

    TempAction temp = new TempAction();
    temp.response = new Response(sleeper, servletResponse, metrics);
    temp.memcache = new Memcache(null, metrics);
    StringWriter tempWriter = new StringWriter();
    when(servletResponse.getWriter()).thenReturn(new PrintWriter(tempWriter));
    temp.requestPath = stashWriter.toString().replaceFirst(".*/", "");
    temp.run();
View Full Code Here

TOP

Related Classes of foo.domaintest.action.Response

Copyright © 2018 www.massapicom. 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.