From 5dbae2c9795568c256669365f619bbb81c584f06 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Fri, 3 Apr 2009 11:14:37 +0000 Subject: [PATCH] More tests for combine() --- .../org/springframework/util/AntPathMatcherTests.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/org.springframework.core/src/test/java/org/springframework/util/AntPathMatcherTests.java b/org.springframework.core/src/test/java/org/springframework/util/AntPathMatcherTests.java index 72bfbeed5a..a14fe6c388 100644 --- a/org.springframework.core/src/test/java/org/springframework/util/AntPathMatcherTests.java +++ b/org.springframework.core/src/test/java/org/springframework/util/AntPathMatcherTests.java @@ -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) {