Package org.apache.tuscany.sca.contribution.service.impl

Examples of org.apache.tuscany.sca.contribution.service.impl.ContributionMetadataLoaderImpl.load()


        ContributionFactory factory = new ContributionFactoryImpl();
        ContributionMetadataLoaderImpl loader =
            new ContributionMetadataLoaderImpl(new DefaultAssemblyFactory(), factory);
        Contribution contribution = factory.createContribution();
        contribution.setModelResolver(new ModelResolverImpl(getClass().getClassLoader()));
        loader.load(contribution, reader);
        assertNotNull(contribution);
        assertEquals(1, contribution.getImports().size());
        assertEquals(1, contribution.getExports().size());
        assertEquals(2, contribution.getDeployables().size());
    }
View Full Code Here


        ContributionMetadataLoaderImpl loader =
            new ContributionMetadataLoaderImpl(new DefaultAssemblyFactory(), factory);
        Contribution contribution = factory.createContribution();
        contribution.setModelResolver(new ModelResolverImpl(getClass().getClassLoader()));
        try {
            loader.load(contribution, reader);
            fail("InvalidException should have been thrown");
        } catch (InvalidValueException e) {
            assertTrue(true);
        }
    }   
View Full Code Here

        ContributionFactory factory = new ContributionFactoryImpl();
        ContributionMetadataLoaderImpl loader =
            new ContributionMetadataLoaderImpl(new DefaultAssemblyFactory(), factory);
        Contribution contribution = factory.createContribution();
        contribution.setModelResolver(new ModelResolverImpl(getClass().getClassLoader()));
        loader.load(contribution, reader);
        assertNotNull(contribution);
        assertEquals(1, contribution.getImports().size());
        assertEquals(1, contribution.getExports().size());
        assertEquals(2, contribution.getDeployables().size());
    }
View Full Code Here

        ContributionMetadataLoaderImpl loader =
            new ContributionMetadataLoaderImpl(new DefaultAssemblyFactory(), factory);
        Contribution contribution = factory.createContribution();
        contribution.setModelResolver(new ModelResolverImpl(getClass().getClassLoader()));
        try {
            loader.load(contribution, reader);
            fail("InvalidException should have been thrown");
        } catch (InvalidValueException e) {
            assertTrue(true);
        }
    }   
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.