Package stubs

Examples of stubs.StringRet


  public void testMountedIndexSlash() {
    context.put(MojasefConstants.DEFAULT_LEAFNAME, "index");
        context.put(MojasefConstants.REQUEST_LOCALPATH, "/thing/what/ugh/");
        context.put(MojasefConstants.MOUNTPOINT, "/thing/what/ugh");
        Mojasef.delegate(collector, keeper, new StringRet(), dfl);
        assertCollected("StringRet index worked");
  }
View Full Code Here


  }

  public void testCommand() {
    context.put(MojasefConstants.DEFAULT_LEAFNAME, "xindex");
        context.put(HTTPConstants.REQUEST_METHOD, "GET");
        Mojasef.delegate(collector, keeper, new StringRet(), dfl);
        assertCollected("StringRet GET worked");
  }
View Full Code Here

  }
   
  public void testCommandFallbackToIndex() {
    context.put(MojasefConstants.DEFAULT_LEAFNAME, "index");
        context.put(HTTPConstants.REQUEST_METHOD, "POST");
        Mojasef.delegate(collector, keeper, new StringRet(), dfl);
        assertCollected("StringRet index worked");
  }
View Full Code Here

        context.put(Templater.TEMPLATE, templates);
        context.put(Templater.TEMPLATER, new DirectFetcherTemplater(templates));
    }

  public void testStringRetNoTemplate() throws IOException {
        Mojasef.delegateAndExpand(collector, keeper, new StringRet(), dfl);
        assertCollected("StringRet worked");
  }
View Full Code Here

    public void assertCollected(String text) {
        assertEquals(text, collector.toString());
    }

  public void testStringRet() {
        Mojasef.delegate(keeper, new StringRet(), dfl);
        assertCollected("StringRet worked");
  }
View Full Code Here

    public void setUp() {
        Tract t1 = new MapTract("hello");
        Tract t2 = new MapTract("hello${@" + HTTPConstants.RESPONSE_CODE +"='404'}");
        params = new HashMap<String, Object>();
        params.put(MojasefConstants.HTTP_APPLICATION, new StringRet());
        params.put(Templater.TEMPLATE + ".t1", t1);
        params.put(Templater.TEMPLATE + ".t2", t2);
        init(params);
    }
View Full Code Here

public class SimpleAppTest extends WebAppTestCase {
  Map<String, Object> params;

  public void setUp() {
    params = new HashMap<String, Object>();
    params.put(MojasefConstants.HTTP_APPLICATION, new StringRet());
    params.put(Templater.TEMPLATE + ".pt", "hello ${a},${b}");
    params.put(Templater.TEMPLATE + ".pz", "returned ${this}, something=${something} hello ${a},${b}");
        params.put(Templater.TEMPLATE + ".qq", "hello${parameters.asQueryString}");
        params.put(Templater.TEMPLATE + ".qf", "hello${parameters.asHiddenFields}");
        params.put(Templater.TEMPLATE + ".qp", "${'a,x'|parameters.update}hello${parameters.asQueryString}");
View Full Code Here

public class AliasTest extends TestCase {
    LocalServer server;
   
    public void setUp() throws IOException {
        server = new LocalServer(new StringRet());
    }
View Full Code Here

TOP

Related Classes of stubs.StringRet

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.