Package org.apache.tuscany.sca.assembly

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


    private PolicyFactory policyFactory;

    @Override
    public void setUp() throws Exception {
        ModelFactoryExtensionPoint factories = new DefaultModelFactoryExtensionPoint();
        factory = new DefaultAssemblyFactory();
        factories.addFactory(factory);
        policyFactory = new DefaultPolicyFactory();
        factories.addFactory(policyFactory);
       
        inputFactory = XMLInputFactory.newInstance();
View Full Code Here


        this.defaultFactory = defaultFactory;
        this.beanRegistry = beanRegistry;
    }

    public BeanAssemblyFactory(BeanDefinitionRegistry beanRegistry) {
        this(new DefaultAssemblyFactory(), beanRegistry);
    }
View Full Code Here

            if (reader.next() == END_ELEMENT && IMPLEMENTATION_NOTIFICATION.equals(reader.getName())) {
                break;
            }
        }
       
        ComponentType componentType = new DefaultAssemblyFactory().createComponentType();
        componentType.setURI(componentTypeName + ".componentType");
        componentType.setUnresolved(true);
        implementation.setComponentType(componentType);
       
        return implementation;
View Full Code Here

    private ServiceProcessor processor;
    private JavaImplementationFactory javaImplementationFactory;

    @Override
    protected void setUp() throws Exception {
        processor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory());
        javaImplementationFactory = new DefaultJavaImplementationFactory();
    }
View Full Code Here

    public InitProcessorTestCase() {
        javaImplementationFactory = new DefaultJavaImplementationFactory();
    }

    public void testInit() throws Exception {
        InitProcessor processor = new InitProcessor(new DefaultAssemblyFactory());
        JavaImplementation type = javaImplementationFactory.createJavaImplementation();
        Method method = InitProcessorTestCase.Foo.class.getMethod("init");
        processor.visitMethod(method, type);
        assertNotNull(type.getInitMethod());
    }
View Full Code Here

        processor.visitMethod(method, type);
        assertNotNull(type.getInitMethod());
    }

    public void testBadInit() throws Exception {
        InitProcessor processor = new InitProcessor(new DefaultAssemblyFactory());
        JavaImplementation type = javaImplementationFactory.createJavaImplementation();
        Method method = InitProcessorTestCase.Bar.class.getMethod("badInit", String.class);
        try {
            processor.visitMethod(method, type);
            fail();
View Full Code Here

            // expected
        }
    }

    public void testTwoInit() throws Exception {
        InitProcessor processor = new InitProcessor(new DefaultAssemblyFactory());
        JavaImplementation type = javaImplementationFactory.createJavaImplementation();
        Method method = InitProcessorTestCase.Bar.class.getMethod("init");
        Method method2 = InitProcessorTestCase.Bar.class.getMethod("init2");
        processor.visitMethod(method, type);
        try {
View Full Code Here

    private OSGiImplementationProcessor osgiProcessor;

    @Override
    public void setUp() throws Exception {
        ModelFactoryExtensionPoint modelFactories = new DefaultModelFactoryExtensionPoint();
        assemblyFactory = new DefaultAssemblyFactory();
        modelFactories.addFactory(assemblyFactory);
        scaBindingFactory = new SCABindingFactoryImpl();
        policyFactory = new DefaultPolicyFactory();
        mapper = new InterfaceContractMapperImpl();
        inputFactory = XMLInputFactory.newInstance();
View Full Code Here

    }

    public void testRead() throws Exception {
        XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(new StringReader(VALID_XML));

        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        ContributionFactory contributionFactory = new DefaultContributionFactory();
        ContributionMetadataProcessor processor =
            new ContributionMetadataProcessor(assemblyFactory, contributionFactory, null);
        Contribution contribution = contributionFactory.createContribution();
        contribution.setModelResolver(new TestModelResolver(contribution, null));
View Full Code Here

        assertEquals(2, contribution.getDeployables().size());
  }

    public void testReadInvalid() throws Exception {
        XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(new StringReader(INVALID_XML));
        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        ContributionFactory contributionFactory = new DefaultContributionFactory();
        ContributionMetadataProcessor processor =
            new ContributionMetadataProcessor(assemblyFactory, contributionFactory, null);
        Contribution contribution = contributionFactory.createContribution();
        contribution.setModelResolver(new TestModelResolver(contribution, null));
View Full Code Here

TOP

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

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.