Issue #4173 - Adding more testcases for raw root-ish Resources
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
f4298c12c4
commit
6ac925631c
|
@ -142,6 +142,22 @@ public class WebInfConfigurationTest
|
|||
assertThat(containerResources.get(0).toString(), containsString("jetty-util"));
|
||||
}
|
||||
|
||||
public static Stream<Arguments> rawResourceNames()
|
||||
{
|
||||
return Stream.of(
|
||||
Arguments.of("/", ""),
|
||||
Arguments.of("/a", "a")
|
||||
);
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@MethodSource("rawResourceNames")
|
||||
public void testTinyGetResourceBaseName(String rawPath, String expectedName) throws IOException
|
||||
{
|
||||
Resource resource = Resource.newResource(rawPath);
|
||||
assertThat(WebInfConfiguration.getResourceBaseName(resource), is(expectedName));
|
||||
}
|
||||
|
||||
public static Stream<Arguments> baseResourceNames()
|
||||
{
|
||||
return Stream.of(
|
||||
|
|
Loading…
Reference in New Issue