More tests for combine()

This commit is contained in:
Arjen Poutsma 2009-04-03 11:14:37 +00:00
parent 56ddc76712
commit 5dbae2c979
1 changed files with 8 additions and 1 deletions

View File

@ -351,7 +351,14 @@ public class AntPathMatcherTests {
assertEquals("/hotels/*/booking/{booking}", pathMatcher.combine("/hotels/*/booking", "{booking}"));
assertEquals("/hotel.html", pathMatcher.combine("/*.html", "/hotel.html"));
try {
assertEquals("/hotel.html", pathMatcher.combine("/*.html", "/hotel"));
pathMatcher.combine("/*.html", "/hotel");
fail("IllegalArgumentException expected");
}
catch (IllegalArgumentException ex) {
// expected
}
try {
pathMatcher.combine("/*.html", "/*.txt");
fail("IllegalArgumentException expected");
}
catch (IllegalArgumentException ex) {