Examples of InjectSpecification


Examples of org.apache.tapestry.spec.InjectSpecification

    public void testInjectedValueWrongType()
    {
        Location l = newLocation();

        InjectSpecification spec = newSpec("fred", "service:barney", l);

        EnhancementOperation op = newMock(EnhancementOperation.class);

        InjectedValueProvider p = newMock(InjectedValueProvider.class);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

    public void testInjectMap()
    {
        Location l = newLocation();
        Map injectedValue = new HashMap();
       
        InjectSpecification spec = newSpec("fred", "service:barney", l);
       
        EnhancementOperation op = newMock(EnhancementOperation.class);
       
        InjectedValueProvider p = newMock(InjectedValueProvider.class);
       
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

    }

    private InjectSpecification newInjectSpecification(String propertyName, String type,
            String object, Location location)
    {
        InjectSpecification result = new InjectSpecificationImpl();
        result.setProperty(propertyName);
        result.setType(type);
        result.setObject(object);
        result.setLocation(location);

        return result;
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

    }

    public void testSuccess()
    {
        EnhancementOperation op = newOp();
        InjectSpecification is = newInjectSpecification("property", "object", "service:Foo");
        InjectEnhancementWorker worker = newWorker();
        Map map = newMap("object", worker);
        IComponentSpecification spec = newSpec(is);

        worker.performEnhancement(op, is);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

    public void testUnknownType()
    {
        Location l = newLocation();
        EnhancementOperation op = newOp();
        InjectSpecification is = newInjectSpecification(
                "injectedProperty",
                "object",
                "service:Foo",
                l);
        IComponentSpecification spec = newSpec(is);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

    public void testFailure()
    {
        Location l = newLocation();
       
        EnhancementOperation op = newOp();
        InjectSpecification is = newInjectSpecification("myProperty", "object", "service:Foo", l);
       
        InjectEnhancementWorker worker = newMock(InjectEnhancementWorker.class);
       
        Map map = newMap("object", worker);
        IComponentSpecification spec = newSpec(is);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

    public void testNoExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", null);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

    public void testWithExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", boolean.class);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

    public void testWithExistingPropertyWrongType()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", int.class);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecification

        return newMock(ApplicationStateManager.class);
    }

    private InjectSpecification newSpec(String propertyName, String objectName, Location l)
    {
        InjectSpecification spec = new InjectSpecificationImpl();

        spec.setProperty(propertyName);
        spec.setObject(objectName);
        spec.setLocation(l);

        return spec;
    }
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.