Refine search
@Test public void shouldGenerateDependencies() throws Exception { Archive<?> archive = new JUnitDeploymentAppender().createAuxiliaryArchive(); Assert.assertTrue( "Should have added Extension", archive.contains( ArchivePaths.create("/META-INF/services/org.jboss.arquillian.container.test.spi.TestRunner"))); Assert.assertTrue( "Should have added TestRunner Impl", archive.contains(ArchivePaths.create("/org/jboss/arquillian/junit/container/JUnitTestRunner.class"))); } }
@Test @ArchiveType(EnterpriseContainer.class) public void testAddApplicationResourcePackages() throws Exception { getEnterpriseContainer().addAsApplicationResources(AssetUtil.class.getPackage(), "Test.properties", "Test2.properties"); ArchivePath testPath = new BasicPath(getApplicationPath(), NAME_TEST_PROPERTIES); ArchivePath testPath2 = new BasicPath(getApplicationPath(), NAME_TEST_PROPERTIES_2); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); Assert.assertTrue("Archive should contain " + testPath2, getArchive().contains(testPath2)); }
@Test @ArchiveType(WebContainer.class) public void testAddWebInfResourcePackages() throws Exception { getWebContainer().addAsWebInfResources(AssetUtil.class.getPackage(), "Test.properties", "Test2.properties"); ArchivePath testPath = new BasicPath(getWebInfPath(), NAME_TEST_PROPERTIES); ArchivePath testPath2 = new BasicPath(getWebInfPath(), NAME_TEST_PROPERTIES_2); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); Assert.assertTrue("Archive should contain " + testPath2, getArchive().contains(testPath2)); }
@Test @ArchiveType(WebContainer.class) public void testAddWebResourcePackages() throws Exception { getWebContainer().addAsWebResources(AssetUtil.class.getPackage(), "Test.properties", "Test2.properties"); ArchivePath testPath = new BasicPath(getWebPath(), NAME_TEST_PROPERTIES); ArchivePath testPath2 = new BasicPath(getWebPath(), NAME_TEST_PROPERTIES_2); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); Assert.assertTrue("Archive should contain " + testPath2, getArchive().contains(testPath2)); }
@Test @ArchiveType(LibraryContainer.class) public void testAddLibrariesResource() throws Exception { getLibraryContainer().addAsLibraries(NAME_TEST_PROPERTIES, NAME_TEST_PROPERTIES_2); ArchivePath testPath = new BasicPath(getLibraryPath(), NAME_TEST_PROPERTIES); ArchivePath testPath2 = new BasicPath(getLibraryPath(), NAME_TEST_PROPERTIES_2); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); Assert.assertTrue("Archive should contain " + testPath2, getArchive().contains(testPath2)); }
@Test @ArchiveType(WebContainer.class) public void testAddWebResourcePackage() throws Exception { getWebContainer().addAsWebResource(AssetUtil.class.getPackage(), "Test.properties"); ArchivePath testPath = new BasicPath(getWebPath(), NAME_TEST_PROPERTIES); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(WebContainer.class) public void testSetWebXMLResourceInPackage() throws Exception { getWebContainer().setWebXML(AssetUtil.class.getPackage(), "Test.properties"); ArchivePath testPath = new BasicPath(getWebInfPath(), "web.xml"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(WebContainer.class) public void testAddWebInfResourcePackageStringTarget() throws Exception { getWebContainer().addAsWebInfResource(AssetUtil.class.getPackage(), "Test.properties", "Test.txt"); ArchivePath testPath = new BasicPath(getWebInfPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(ManifestContainer.class) public void testSetManifestResourceInPackage() throws Exception { getManifestContainer().setManifest(AssetUtil.class.getPackage(), "Test.properties"); ArchivePath testPath = new BasicPath(getManifestPath(), MANIFEST_FILE); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(ManifestContainer.class) public void testAddManifestPackage() throws Exception { getManifestContainer().addAsManifestResource(AssetUtil.class.getPackage(), "Test.properties"); ArchivePath testPath = new BasicPath(getManifestPath(), NAME_TEST_PROPERTIES); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(ResourceContainer.class) public void testAddResourcePackage() throws Exception { getResourceContainer().addAsResource(AssetUtil.class.getPackage(), "Test.properties"); ArchivePath testPath = new BasicPath(getResourcePath(), NAME_TEST_PROPERTIES); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(EnterpriseContainer.class) public void testAddApplicationResourcePackageStringTarget() throws Exception { getEnterpriseContainer().addAsApplicationResource(AssetUtil.class.getPackage(), "Test.properties", "Test.txt"); ArchivePath testPath = new BasicPath(getApplicationPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(EnterpriseContainer.class) public void testAddModulePathTargetResource() throws Exception { getEnterpriseContainer().addAsModule(NAME_TEST_PROPERTIES, new BasicPath("Test.properties")); ArchivePath expectedPath = new BasicPath(getModulePath(), "Test.properties"); Assert.assertTrue("Archive should contain " + expectedPath, getArchive().contains(expectedPath)); }
@Test @ArchiveType(ResourceAdapterContainer.class) public void testSetResourceAdapterXMLResourceInPackage() throws Exception { getResourceAdapterContainer().setResourceAdapterXML(AssetUtil.class.getPackage(), "Test.properties"); ArchivePath testPath = new BasicPath(getResourceAdapterPath(), "ra.xml"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(WebContainer.class) public void testAddWebResourcePathTargetResource() throws Exception { getWebContainer().addAsWebResource(NAME_TEST_PROPERTIES, new BasicPath("Test.txt")); ArchivePath testPath = new BasicPath(getWebPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(WebContainer.class) public void testAddWebInfResourcePathTargetResource() throws Exception { getWebContainer().addAsWebInfResource(NAME_TEST_PROPERTIES, new BasicPath("Test.txt")); ArchivePath testPath = new BasicPath(getWebInfPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(WebContainer.class) public void testAddWebInfResourcePackage() throws Exception { getWebContainer().addAsWebInfResource(AssetUtil.class.getPackage(), "Test.properties"); ArchivePath testPath = new BasicPath(getWebInfPath(), NAME_TEST_PROPERTIES); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(ResourceContainer.class) public void testAddResourcePackageStringTarget() throws Exception { getResourceContainer().addAsResource(AssetUtil.class.getPackage(), "Test.properties", "Test.txt"); ArchivePath testPath = new BasicPath(getResourcePath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(ManifestContainer.class) public void testAddManifestPathTargetResource() throws Exception { getManifestContainer().addAsManifestResource(NAME_TEST_PROPERTIES, new BasicPath("Test.txt")); ArchivePath testPath = new BasicPath(getManifestPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(ManifestContainer.class) public void testAddServiceProvider() throws Exception { getManifestContainer().addAsServiceProvider(DummyInterfaceForTest.class, DummyClassForTest.class); ArchivePath testPath = new BasicPath(getManifestPath(), "services/" + DummyInterfaceForTest.class.getName()); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }