if (archivePath != null) { resourceSet = new JarWarResourceSet(this, webAppMount, base, archivePath, internalPath); } else if (file.getName().toLowerCase(Locale.ENGLISH).endsWith(".jar")) {
if (archivePath != null) { resourceSet = new JarWarResourceSet(this, webAppMount, base, archivePath, internalPath); } else if (file.getName().toLowerCase(Locale.ENGLISH).endsWith(".jar")) {
if (archivePath != null) { resourceSet = new JarWarResourceSet(this, webAppMount, base, archivePath, internalPath); } else if (file.getName().toLowerCase(Locale.ENGLISH).endsWith(".jar")) {
@Test public void embeddedWarWithAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.war"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); JarResourceSet jarResourceSet = new JarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), METAINF_RESOURCES); contextMock.init(jarWarResourceSet, jarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getWebResourceRoot().getCreateWebResourceSetCalls()) .isEqualTo(0); }
@Test public void embeddedJarWithAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); JarResourceSet jarResourceSet = new JarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), METAINF_RESOURCES); contextMock.init(jarWarResourceSet, jarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getWebResourceRoot().getCreateWebResourceSetCalls()) .isEqualTo(2); }
@Test public void embeddedJarWithAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); JarResourceSet jarResourceSet = new JarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), METAINF_RESOURCES); contextMock.init(jarWarResourceSet, jarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(1); }
@Test public void embeddedJarWithAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); JarResourceSet jarResourceSet = new JarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), METAINF_RESOURCES); contextMock.init(jarWarResourceSet, jarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(1); }
@Test public void embeddedWarWithAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.war"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); JarResourceSet jarResourceSet = new JarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), METAINF_RESOURCES); contextMock.init(jarWarResourceSet, jarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(0); }
@Test public void embeddedWarWithAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.war"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); JarResourceSet jarResourceSet = new JarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), METAINF_RESOURCES); contextMock.init(jarWarResourceSet, jarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(0); }
@Test public void embeddedJarWithoutAppResources2() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(dirResourceSet, jarWarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(1); }
@Test public void embeddedWarWithoutAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.war"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(jarWarResourceSet, dirResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getWebResourceRoot().getCreateWebResourceSetCalls()) .isEqualTo(0); }
@Test public void embeddedJarWithoutAppResources2() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(dirResourceSet, jarWarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(1); }
@Test public void embeddedJarWithoutAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(jarWarResourceSet, dirResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(1); }
@Test public void embeddedWarWithoutAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.war"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(jarWarResourceSet, dirResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(0); }
@Test public void embeddedJarWithoutAppResources2() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(dirResourceSet, jarWarResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getWebResourceRoot().getCreateWebResourceSetCalls()) .isEqualTo(2); }
@Test public void embeddedJarWithoutAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(jarWarResourceSet, dirResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getWebResourceRoot().getCreateWebResourceSetCalls()) .isEqualTo(2); }
@Test public void embeddedWarWithoutAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.war"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(jarWarResourceSet, dirResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(0); }
@Test public void embeddedJarWithoutAppResources() throws LifecycleException { ContextMock contextMock = new ContextMock(); File file = new File(TARGET + File.separator + TEST_CLASSES + File.separator + "test.jar"); JarWarResourceSet jarWarResourceSet = new JarWarResourceSet(contextMock.getWebResourceRoot(), "/", file.getAbsolutePath(), INTERNAL_JAR, METAINF_RESOURCES); jarWarResourceSet.init(); DirResourceSet dirResourceSet = new DirResourceSet(contextMock.getWebResourceRoot(), TEST, TEST, TEST); contextMock.init(jarWarResourceSet, dirResourceSet); callApplicationEvent(contextMock); assertThat(contextMock.getCalledAnswer().getCalls()) .isEqualTo(1); }