Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





Java - Code Samples

 Sample 1. Code Sample / Example / Snippet of org.apache.ace.deployment.provider.repositorybased.BaseRepositoryHandler.XmlDeploymentArtifact

    public void testGatherSingleArtifactOk() throws Exception {

DeploymentArtifactCollector handler = new DeploymentArtifactCollector(TARGET, VERSION1);



m_parser.parse(m_inputStream, handler);



List<XmlDeploymentArtifact>[] artifacts = handler.getArtifacts();

assert artifacts.length == 1 : "Expected a single artifact to be found!";

assert artifacts[0].size() == 1 : "Expected a single artifact to be found!";



XmlDeploymentArtifact artifact1 = artifacts[0].get(0);

assert new URL("file:///bundle1").equals(artifact1.getUrl()) : "Expected 'file:///bundle1' URL to be found!";

assert artifact1.getDirective().size() == 2 : "Expected two directives to be found!";

assert "bundle1".equals(artifact1.getDirective().get(KEY_SYMBOLICNAME)) : "Expected correct symbolic name to be found!";

assert "1.0.0".equals(artifact1.getDirective().get(KEY_VERSION)) : "Expected correct bundle version to be found!";

}


   Like      Feedback      org.apache.ace.deployment.provider.repositorybased.BaseRepositoryHandler.XmlDeploymentArtifact



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner