Package net.sourceforge.stripes.mock

Examples of net.sourceforge.stripes.mock.MockRoundtrip.addParameter()


    }

    @Test(groups="fast")
    public void bindSingleLetterStringKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapStringLong['a']", "1");
        trip.addParameter("mapStringLong['b']", "2");
        trip.addParameter("mapStringLong['c']", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
View Full Code Here


    @Test(groups="fast")
    public void bindSingleLetterStringKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapStringLong['a']", "1");
        trip.addParameter("mapStringLong['b']", "2");
        trip.addParameter("mapStringLong['c']", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
        Assert.assertEquals(bean.getMapStringLong().get("a"), new Long(1));
View Full Code Here

    @Test(groups="fast")
    public void bindSingleLetterStringKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapStringLong['a']", "1");
        trip.addParameter("mapStringLong['b']", "2");
        trip.addParameter("mapStringLong['c']", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
        Assert.assertEquals(bean.getMapStringLong().get("a"), new Long(1));
        Assert.assertEquals(bean.getMapStringLong().get("b"), new Long(2));
View Full Code Here

    }

    @Test(groups="fast")
    public void bindUnquotedShortKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapShortInteger[1]",    "1");
        trip.addParameter("mapShortInteger[200]""2");
        trip.addParameter("mapShortInteger[3000]", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
View Full Code Here

    @Test(groups="fast")
    public void bindUnquotedShortKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapShortInteger[1]",    "1");
        trip.addParameter("mapShortInteger[200]""2");
        trip.addParameter("mapShortInteger[3000]", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
        Assert.assertEquals(bean.getMapShortInteger().get( (short) 1 ), new Integer(1));
View Full Code Here

    @Test(groups="fast")
    public void bindUnquotedShortKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapShortInteger[1]",    "1");
        trip.addParameter("mapShortInteger[200]""2");
        trip.addParameter("mapShortInteger[3000]", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
        Assert.assertEquals(bean.getMapShortInteger().get( (short) 1 ), new Integer(1));
        Assert.assertEquals(bean.getMapShortInteger().get( (short) 200), new Integer(2));
View Full Code Here

    }

    @Test(groups="fast")
    public void bindSingleQuotedShortKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapShortInteger['1']",    "1");
        trip.addParameter("mapShortInteger['200']""2");
        trip.addParameter("mapShortInteger['3000']", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
View Full Code Here

    @Test(groups="fast")
    public void bindSingleQuotedShortKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapShortInteger['1']",    "1");
        trip.addParameter("mapShortInteger['200']""2");
        trip.addParameter("mapShortInteger['3000']", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
        Assert.assertEquals(bean.getMapShortInteger().get( (short) 1 ), new Integer(1));
View Full Code Here

    @Test(groups="fast")
    public void bindSingleQuotedShortKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapShortInteger['1']",    "1");
        trip.addParameter("mapShortInteger['200']""2");
        trip.addParameter("mapShortInteger['3000']", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
        Assert.assertEquals(bean.getMapShortInteger().get( (short) 1 ), new Integer(1));
        Assert.assertEquals(bean.getMapShortInteger().get( (short) 200), new Integer(2));
View Full Code Here

    }

    @Test(groups="fast")
    public void bindDoubleQuotedShortKey() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("mapShortInteger[\"1\"]",    "1");
        trip.addParameter("mapShortInteger[\"200\"]""2");
        trip.addParameter("mapShortInteger[\"3000\"]", "3");
        trip.execute();

        MapBindingTests bean = trip.getActionBean(MapBindingTests.class);
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.