mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-04 21:09:13 +00:00
Issue #4776 - Adding different length tests to WebSocketUriMappingTest
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
0234ead671
commit
5c2f00c1f5
@ -167,4 +167,16 @@ public class WebSocketUriMappingTest
|
||||
|
||||
assertThat(getBestMatch("/a/b/c"), is("suffix2"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDifferentLengths()
|
||||
{
|
||||
mapping.put(new UriTemplatePathSpec("/a/{var}/c"), "endpointA");
|
||||
mapping.put(new UriTemplatePathSpec("/a/{var}/c/d"), "endpointB");
|
||||
mapping.put(new UriTemplatePathSpec("/a/{var1}/{var2}/d/e"), "endpointC");
|
||||
|
||||
assertThat(getBestMatch("/a/b/c"), is("endpointA"));
|
||||
assertThat(getBestMatch("/a/d/c/d"), is("endpointB"));
|
||||
assertThat(getBestMatch("/a/x/y/d/e"), is("endpointC"));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user