Polishing

This commit is contained in:
Sam Brannen 2019-07-07 16:32:18 +02:00
parent fae75cb238
commit 575027af24
2 changed files with 6 additions and 5 deletions

View File

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.util.pattern;
import java.util.Comparator;

View File

@ -22,23 +22,23 @@ import org.springframework.util.RouteMatcher;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for the {@link PathPatternRouteMatcher}
* Tests for the {@link PathPatternRouteMatcher}.
*
* @author Brian Clozel
* @since 5.2
*/
public class PathPatternRouteMatcherTests {
PathPatternRouteMatcher routeMatcher = new PathPatternRouteMatcher(new PathPatternParser());
@Test
public void matchRoute() {
PathPatternRouteMatcher routeMatcher = new PathPatternRouteMatcher(new PathPatternParser());
RouteMatcher.Route route = routeMatcher.parseRoute("/projects/spring-framework");
assertThat(routeMatcher.match("/projects/{name}", route)).isTrue();
}
@Test
public void matchRouteCustomSeparator() {
public void matchRouteWithCustomSeparator() {
PathPatternParser pathPatternParser = new PathPatternParser();
pathPatternParser.setSeparator('.');
PathPatternRouteMatcher routeMatcher = new PathPatternRouteMatcher(pathPatternParser);