Package org.apache.tuscany.sca.assembly

Examples of org.apache.tuscany.sca.assembly.TestImplementation


        c.setName(name);

        ConstrainingType constraint = createConstrainingType();
        c.setConstrainingType(constraint);

        Implementation i = new TestImplementation(factory);
        c.setImplementation(i);

        ComponentProperty p = factory.createComponentProperty();
        p.setName("currency");
        p.setValue("USD");
        p.setMustSupply(true);
        p.setXSDType(new QName("", ""));
        p.setProperty(i.getProperties().get(0));
        c.getProperties().add(p);

        ComponentReference ref1 = factory.createComponentReference();
        ref1.setName("accountDataService");
        ref1.setMultiplicity(Multiplicity.ONE_ONE);
        ref1.setInterfaceContract(new TestInterfaceContract(factory));
        ref1.setReference(i.getReferences().get(0));
        c.getReferences().add(ref1);
        ref1.getBindings().add(new TestBinding(factory));

        ComponentReference ref2 = factory.createComponentReference();
        ref2.setName("stockQuoteService");
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setReference(i.getReferences().get(1));
        c.getReferences().add(ref2);
        ref2.getBindings().add(new TestBinding(factory));

        ComponentService s = factory.createComponentService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        s.setService(i.getServices().get(0));
        c.getServices().add(s);
        s.getBindings().add(new TestBinding(factory));

        return c;
    }
View Full Code Here


        c.setName(name);

        ConstrainingType constraint = createConstrainingType();
        c.setConstrainingType(constraint);

        Implementation i = new TestImplementation(factory);
        c.setImplementation(i);

        ComponentProperty p = factory.createComponentProperty();
        p.setName("currency");
        p.setValue("USD");
        p.setMustSupply(true);
        p.setXSDType(new QName("", ""));
        p.setProperty(i.getProperties().get(0));
        c.getProperties().add(p);

        ComponentReference ref1 = factory.createComponentReference();
        ref1.setName("accountDataService");
        ref1.setMultiplicity(Multiplicity.ONE_ONE);
        ref1.setInterfaceContract(new TestInterfaceContract(factory));
        ref1.setReference(i.getReferences().get(0));
        c.getReferences().add(ref1);
        ref1.getBindings().add(new TestBinding(factory));

        ComponentReference ref2 = factory.createComponentReference();
        ref2.setName("stockQuoteService");
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setReference(i.getReferences().get(1));
        c.getReferences().add(ref2);
        ref2.getBindings().add(new TestBinding(factory));

        ComponentService s = factory.createComponentService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        s.setService(i.getServices().get(0));
        c.getServices().add(s);
        s.getBindings().add(new TestBinding(factory));

        return c;
    }
View Full Code Here

        c.setName(name);

        ConstrainingType constraint = createConstrainingType();
        c.setConstrainingType(constraint);

        Implementation i = new TestImplementation(factory);
        c.setImplementation(i);

        ComponentProperty p = factory.createComponentProperty();
        p.setName("currency");
        p.setValue("USD");
        p.setMustSupply(true);
        p.setXSDType(new QName("", ""));
        p.setProperty(i.getProperties().get(0));
        c.getProperties().add(p);

        ComponentReference ref1 = factory.createComponentReference();
        ref1.setName("accountDataService");
        ref1.setMultiplicity(Multiplicity.ONE_ONE);
        ref1.setInterfaceContract(new TestInterfaceContract(factory));
        ref1.setReference(i.getReferences().get(0));
        c.getReferences().add(ref1);
        ref1.getBindings().add(new TestBinding(factory));

        ComponentReference ref2 = factory.createComponentReference();
        ref2.setName("stockQuoteService");
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setReference(i.getReferences().get(1));
        c.getReferences().add(ref2);
        ref2.getBindings().add(new TestBinding(factory));

        ComponentService s = factory.createComponentService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        s.setService(i.getServices().get(0));
        c.getServices().add(s);
        s.getBindings().add(new TestBinding(factory));

        return c;
    }
View Full Code Here

        c.setName(name);

        ConstrainingType constraint = createConstrainingType();
        c.setConstrainingType(constraint);

        Implementation i = new TestImplementation(factory);
        c.setImplementation(i);

        ComponentProperty p = factory.createComponentProperty();
        p.setName("currency");
        p.setValue("USD");
        p.setMustSupply(true);
        p.setXSDType(new QName("", ""));
        p.setProperty(i.getProperties().get(0));
        c.getProperties().add(p);

        ComponentReference ref1 = factory.createComponentReference();
        ref1.setName("accountDataService");
        ref1.setMultiplicity(Multiplicity.ONE_ONE);
        ref1.setInterfaceContract(new TestInterfaceContract(factory));
        ref1.setReference(i.getReferences().get(0));
        c.getReferences().add(ref1);
        ref1.getBindings().add(new TestBinding(factory));

        ComponentReference ref2 = factory.createComponentReference();
        ref2.setName("stockQuoteService");
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setReference(i.getReferences().get(1));
        c.getReferences().add(ref2);
        ref2.getBindings().add(new TestBinding(factory));

        ComponentService s = factory.createComponentService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        s.setService(i.getServices().get(0));
        c.getServices().add(s);
        s.getBindings().add(new TestBinding(factory));

        return c;
    }
View Full Code Here

        c.setName(name);

        ConstrainingType constraint = createConstrainingType();
        c.setConstrainingType(constraint);

        Implementation i = new TestImplementation(factory);
        c.setImplementation(i);

        ComponentProperty p = factory.createComponentProperty();
        p.setName("currency");
        p.setValue("USD");
        p.setMustSupply(true);
        p.setXSDType(new QName("", ""));
        p.setProperty(i.getProperties().get(0));
        c.getProperties().add(p);

        ComponentReference ref1 = factory.createComponentReference();
        ref1.setName("accountDataService");
        ref1.setMultiplicity(Multiplicity.ONE_ONE);
        ref1.setInterfaceContract(new TestInterfaceContract(factory));
        ref1.setReference(i.getReferences().get(0));
        c.getReferences().add(ref1);
        ref1.getBindings().add(new TestBinding(factory));

        ComponentReference ref2 = factory.createComponentReference();
        ref2.setName("stockQuoteService");
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setReference(i.getReferences().get(1));
        c.getReferences().add(ref2);
        ref2.getBindings().add(new TestBinding(factory));

        ComponentService s = factory.createComponentService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        s.setService(i.getServices().get(0));
        c.getServices().add(s);
        s.getBindings().add(new TestBinding(factory));

        return c;
    }
View Full Code Here

        c.setName(name);

        ConstrainingType constraint = createConstrainingType();
        c.setConstrainingType(constraint);

        Implementation i = new TestImplementation(factory);
        c.setImplementation(i);

        ComponentProperty p = factory.createComponentProperty();
        p.setName("currency");
        p.setValue("USD");
        p.setMustSupply(true);
        p.setXSDType(new QName("", ""));
        p.setProperty(i.getProperties().get(0));
        c.getProperties().add(p);

        ComponentReference ref1 = factory.createComponentReference();
        ref1.setName("accountDataService");
        ref1.setMultiplicity(Multiplicity.ONE_ONE);
        ref1.setInterfaceContract(new TestInterfaceContract(factory));
        ref1.setReference(i.getReferences().get(0));
        c.getReferences().add(ref1);
        ref1.getBindings().add(new TestBinding(factory));

        ComponentReference ref2 = factory.createComponentReference();
        ref2.setName("stockQuoteService");
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setReference(i.getReferences().get(1));
        c.getReferences().add(ref2);
        ref2.getBindings().add(new TestBinding(factory));

        ComponentService s = factory.createComponentService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        s.setService(i.getServices().get(0));
        c.getServices().add(s);
        s.getBindings().add(new TestBinding(factory));

        return c;
    }
View Full Code Here

        c.setName(name);

        ConstrainingType constraint = createConstrainingType();
        c.setConstrainingType(constraint);

        Implementation i = new TestImplementation(factory);
        c.setImplementation(i);

        ComponentProperty p = factory.createComponentProperty();
        p.setName("currency");
        p.setValue("USD");
        p.setMustSupply(true);
        p.setXSDType(new QName("", ""));
        p.setProperty(i.getProperties().get(0));
        c.getProperties().add(p);

        ComponentReference ref1 = factory.createComponentReference();
        ref1.setName("accountDataService");
        ref1.setMultiplicity(Multiplicity.ONE_ONE);
        ref1.setInterfaceContract(new TestInterfaceContract(factory));
        ref1.setReference(i.getReferences().get(0));
        c.getReferences().add(ref1);
        ref1.getBindings().add(new TestBinding(factory));

        ComponentReference ref2 = factory.createComponentReference();
        ref2.setName("stockQuoteService");
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setReference(i.getReferences().get(1));
        c.getReferences().add(ref2);
        ref2.getBindings().add(new TestBinding(factory));

        ComponentService s = factory.createComponentService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        s.setService(i.getServices().get(0));
        c.getServices().add(s);
        s.getBindings().add(new TestBinding(factory));

        return c;
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.assembly.TestImplementation

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.