@@ -29,9 +29,10 @@ public class WLSDeployArchiveTest {
29
29
private static final String APP2_ENTRY_NAME1 = "wlsdeploy/applications/my-other-app.war" ;
30
30
private static final String APP2_ENTRY_NAME2 = "wlsdeploy/applications/my-other-app(1).war" ;
31
31
private static final String APP2_ENTRY_NAME3 = "wlsdeploy/applications/my-other-app(2).war" ;
32
+ private static final String INVALID_APP_ENTRY_NAME = "wlsdeploy/applications/does-not-exist.war" ;
32
33
private static final String APP_DIR_TO_ADD = "src/test/resources/my-app/" ;
33
34
private static final String APP_DIR_ENTRY_NAME = "wlsdeploy/applications/my-app/" ;
34
- private static final String INVALID_APP_ENTRY_NAME = "wlsdeploy/applications/does-not-exist.war " ;
35
+ private static final String INVALID_DIR_ENTRY_NAME = "wlsdeploy/applications/does-not-exist/ " ;
35
36
36
37
private static final String ZIP_FILE_EXISTING_EMPTY_FILE = "my-empty-zip.zip" ;
37
38
private static final String ZIP_FILE_EXISTING_BINARIES_FILE = "DiscoveredDemoDomain.zip" ;
@@ -104,7 +105,8 @@ public void testIsAFile() throws Exception {
104
105
WLSDeployArchive archive = new WLSDeployArchive (APPS_ARCHIVE_FILE_NAME );
105
106
archive .addApplication (new File (APP1_TO_ADD ));
106
107
Assert .assertTrue ("File not found in archive: " + APP1_ENTRY_NAME1 , archive .containsFile (APP1_ENTRY_NAME1 ));
107
- Assert .assertTrue ("File not found in archive: " + APP1_ENTRY_NAME1 , archive .containsFileOrPath (APP1_ENTRY_NAME1 ));
108
+ Assert .assertTrue ("File not found in archive: "
109
+ + APP1_ENTRY_NAME1 , archive .containsFileOrPath (APP1_ENTRY_NAME1 ));
108
110
Assert .assertFalse ("Is not a File" , archive .containsFile (APP_DIR_ENTRY_NAME ));
109
111
Assert .assertFalse ("File should not exist" , archive .containsFileOrPath (INVALID_APP_ENTRY_NAME ));
110
112
archive .close ();
@@ -118,6 +120,7 @@ public void testIsAPath() throws Exception {
118
120
Assert .assertTrue ("Path not found in archive: " + APP_DIR_ENTRY_NAME ,
119
121
archive .containsFileOrPath (APP_DIR_ENTRY_NAME ));
120
122
Assert .assertFalse ("Is not a Path" , archive .containsPath (APP1_ENTRY_NAME1 ));
123
+ Assert .assertFalse ("Path should not exist" , archive .containsFileOrPath (INVALID_DIR_ENTRY_NAME ));
121
124
}
122
125
123
126
@ Test
0 commit comments