Refine search
@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(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(ResourceContainer.class) public void testAddResourcePathTargetResource() throws Exception { getResourceContainer().addAsResource(NAME_TEST_PROPERTIES, new BasicPath("Test.txt")); ArchivePath testPath = new BasicPath(getResourcePath(), "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(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(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(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 testAddWebResourceURL() throws Exception { ArchivePath targetPath = new BasicPath("Test.properties"); getWebContainer().addAsWebResource(getURLForClassResource(NAME_TEST_PROPERTIES), targetPath); ArchivePath testPath = new BasicPath(getWebPath(), targetPath); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(WebContainer.class) public void testAddWebInfResourcePathTargetURL() throws Exception { getWebContainer().addAsWebInfResource(getURLForClassResource(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(ManifestContainer.class) public void testAddManifestPathTargetAsset() throws Exception { getManifestContainer().addAsManifestResource(getAssetForClassResource(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(ResourceContainer.class) public void testAddResourcePathTargetURL() throws Exception { getResourceContainer().addAsResource(getURLForClassResource(NAME_TEST_PROPERTIES), new BasicPath("Test.txt")); ArchivePath testPath = new BasicPath(getResourcePath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(ResourceContainer.class) public void testAddResourcePathTargetAsset() throws Exception { getResourceContainer().addAsResource(getAssetForClassResource(NAME_TEST_PROPERTIES), new BasicPath("Test.txt")); ArchivePath testPath = new BasicPath(getResourcePath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(LibraryContainer.class) public void testAddLibraryPathTargetFile() throws Exception { getLibraryContainer().addAsLibrary(getFileForClassResource(NAME_TEST_PROPERTIES), new BasicPath("Test.txt")); ArchivePath testPath = new BasicPath(getLibraryPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }
@Test @ArchiveType(EnterpriseContainer.class) public void testAddApplicationPathTargetFile() throws Exception { getEnterpriseContainer().addAsApplicationResource(getFileForClassResource(NAME_TEST_PROPERTIES), new BasicPath("Test.txt")); ArchivePath expectedPath = new BasicPath(getApplicationPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + expectedPath, getArchive().contains(expectedPath)); }
@Test @ArchiveType(EnterpriseContainer.class) public void testAddApplicationPathTargetURL() throws Exception { getEnterpriseContainer().addAsApplicationResource(getURLForClassResource(NAME_TEST_PROPERTIES), new BasicPath("Test.txt")); ArchivePath expectedPath = new BasicPath(getApplicationPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + expectedPath, getArchive().contains(expectedPath)); }
@Test @ArchiveType(EnterpriseContainer.class) public void testAddModulePathTargetURL() throws Exception { getEnterpriseContainer().addAsModule(getURLForClassResource(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(WebContainer.class) public void testAddWebResourcePathTargetFile() throws Exception { getWebContainer().addAsWebResource(getFileForClassResource(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 testAddWebInfResourcePathTargetAsset() throws Exception { getWebContainer() .addAsWebInfResource(getAssetForClassResource(NAME_TEST_PROPERTIES), new BasicPath("Test.txt")); ArchivePath testPath = new BasicPath(getWebInfPath(), "Test.txt"); Assert.assertTrue("Archive should contain " + testPath, getArchive().contains(testPath)); }