mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Update tests to expect additional entry in test jar
Closes gh-4124
This commit is contained in:
parent
888fa90265
commit
04c2bd9c89
@ -101,7 +101,7 @@ public class ExplodedArchiveTests {
|
|||||||
@Test
|
@Test
|
||||||
public void getEntries() throws Exception {
|
public void getEntries() throws Exception {
|
||||||
Map<String, Archive.Entry> entries = getEntriesMap(this.archive);
|
Map<String, Archive.Entry> entries = getEntriesMap(this.archive);
|
||||||
assertThat(entries.size(), equalTo(9));
|
assertThat(entries.size(), equalTo(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -91,6 +91,7 @@ public class JarFileTests {
|
|||||||
assertThat(entries.nextElement().getName(), equalTo("special/"));
|
assertThat(entries.nextElement().getName(), equalTo("special/"));
|
||||||
assertThat(entries.nextElement().getName(), equalTo("special/\u00EB.dat"));
|
assertThat(entries.nextElement().getName(), equalTo("special/\u00EB.dat"));
|
||||||
assertThat(entries.nextElement().getName(), equalTo("nested.jar"));
|
assertThat(entries.nextElement().getName(), equalTo("nested.jar"));
|
||||||
|
assertThat(entries.nextElement().getName(), equalTo("another-nested.jar"));
|
||||||
assertThat(entries.hasMoreElements(), equalTo(false));
|
assertThat(entries.hasMoreElements(), equalTo(false));
|
||||||
URL jarUrl = new URL("jar:" + this.rootJarFile.toURI() + "!/");
|
URL jarUrl = new URL("jar:" + this.rootJarFile.toURI() + "!/");
|
||||||
URLClassLoader urlClassLoader = new URLClassLoader(new URL[] { jarUrl });
|
URLClassLoader urlClassLoader = new URLClassLoader(new URL[] { jarUrl });
|
||||||
@ -132,6 +133,7 @@ public class JarFileTests {
|
|||||||
assertThat(entries.nextElement().getName(), equalTo("special/"));
|
assertThat(entries.nextElement().getName(), equalTo("special/"));
|
||||||
assertThat(entries.nextElement().getName(), equalTo("special/\u00EB.dat"));
|
assertThat(entries.nextElement().getName(), equalTo("special/\u00EB.dat"));
|
||||||
assertThat(entries.nextElement().getName(), equalTo("nested.jar"));
|
assertThat(entries.nextElement().getName(), equalTo("nested.jar"));
|
||||||
|
assertThat(entries.nextElement().getName(), equalTo("another-nested.jar"));
|
||||||
assertThat(entries.hasMoreElements(), equalTo(false));
|
assertThat(entries.hasMoreElements(), equalTo(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user