Package net.sourceforge.stripes.test

Examples of net.sourceforge.stripes.test.TestActionBean$PropertyLess


        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("context.eventName", "woohaa!");
        trip.addParameter(" context.eventName", "woohaa!");
        trip.execute();

        TestActionBean bean = trip.getActionBean(TestActionBean.class);
        ActionBeanContext context = bean.getContext();
        Assert.assertFalse("woohaa!".equals(context.getEventName()));
    }
View Full Code Here


        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("Context.eventName", "woohaa!");
        trip.addParameter(" Context.eventName", "woohaa!");
        trip.execute();

        TestActionBean bean = trip.getActionBean(TestActionBean.class);
        ActionBeanContext context = bean.getContext();
        Assert.assertFalse("woohaa!".equals(context.getEventName()));
    }
View Full Code Here

        // Should be able to set it just fine
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("colors", "Red", "Green", "Blue");
        trip.execute();

        TestActionBean bean = trip.getActionBean(TestActionBean.class);
        TestActionBean.Color[] colors = bean.getColors();
        Assert.assertNotNull(colors);
        Assert.assertEquals(colors.length, 3);
        Assert.assertEquals(colors[0], TestActionBean.Color.Red);
        Assert.assertEquals(colors[1], TestActionBean.Color.Green);
        Assert.assertEquals(colors[2], TestActionBean.Color.Blue);
View Full Code Here

    public void testBindingToSubclassOfDeclaredType() throws Exception {
        MockRoundtrip trip = getRoundtrip();
        trip.addParameter("item.id", "1000000");
        trip.execute();

        TestActionBean bean = trip.getActionBean(TestActionBean.class);
        TestActionBean.PropertyLess item = bean.getItem();
        Assert.assertEquals(item.getClass(), TestActionBean.Item.class);
        Assert.assertEquals( ((TestActionBean.Item) item).getId(), new Long(1000000l));
    }
View Full Code Here

public class PropertyExpressionEvaluationTests extends FilterEnabledTestBase {

    @Test(groups="fast")
    public void testGetBasicPropertyType() {
        PropertyExpression expr = PropertyExpression.getExpression("singleLong");
        PropertyExpressionEvaluation eval = new PropertyExpressionEvaluation(expr, new TestActionBean());
        Class<?> type = eval.getType();
        Assert.assertEquals(type, Long.class);
    }
View Full Code Here

    }

    @Test(groups="fast")
    public void testGetPropertyTypeWithPropertyAccess() {
        PropertyExpression expr = PropertyExpression.getExpression("publicLong");
        PropertyExpressionEvaluation eval = new PropertyExpressionEvaluation(expr, new TestActionBean());
        Class<?> type = eval.getType();
        Assert.assertEquals(type, Long.class);
    }
View Full Code Here

    }

    @Test(groups="fast")
    public void testGetPropertyTypeForListOfLongs() {
        PropertyExpression expr = PropertyExpression.getExpression("listOfLongs[17]");
        PropertyExpressionEvaluation eval = new PropertyExpressionEvaluation(expr, new TestActionBean());
        Class<?> type = eval.getType();
        Assert.assertEquals(type, Long.class);
    }
View Full Code Here

    }

    @Test(groups="fast")
    public void testGetPropertyTypeForReadThroughList() {
        PropertyExpression expr = PropertyExpression.getExpression("listOfBeans[3].enumProperty");
        PropertyExpressionEvaluation eval = new PropertyExpressionEvaluation(expr, new TestActionBean());
        Class<?> type = eval.getType();
        Assert.assertEquals(type, TestEnum.class);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.test.TestActionBean$PropertyLess

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.