Polishing
This commit is contained in:
parent
fae75cb238
commit
575027af24
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue