use of cn.taketoday.web.RequestContext in project today-infrastructure by TAKETODAY.
the class DefaultRequestToViewNameTranslatorTests method testGetViewNameWithPrefix.
@PathPatternsParameterizedTest
void testGetViewNameWithPrefix(Function<String, RequestContext> requestFactory) {
final String prefix = "fiona_";
RequestContext request = requestFactory.apply(VIEW_NAME);
this.translator.setPrefix(prefix);
assertViewName(request, prefix + VIEW_NAME);
}
use of cn.taketoday.web.RequestContext in project today-infrastructure by TAKETODAY.
the class DefaultRequestToViewNameTranslatorTests method testGetViewNameWithNoExtension.
@PathPatternsParameterizedTest
void testGetViewNameWithNoExtension(Function<String, RequestContext> requestFactory) {
RequestContext request = requestFactory.apply(VIEW_NAME);
assertViewName(request, VIEW_NAME);
}
use of cn.taketoday.web.RequestContext in project today-infrastructure by TAKETODAY.
the class DefaultRequestToViewNameTranslatorTests method testGetViewNameWithNullSuffix.
@PathPatternsParameterizedTest
void testGetViewNameWithNullSuffix(Function<String, RequestContext> requestFactory) {
RequestContext request = requestFactory.apply(VIEW_NAME);
this.translator.setSuffix(null);
assertViewName(request, VIEW_NAME);
}
use of cn.taketoday.web.RequestContext in project today-infrastructure by TAKETODAY.
the class DefaultRequestToViewNameTranslatorTests method testGetViewNameWithSemicolonContent.
@PathPatternsParameterizedTest
void testGetViewNameWithSemicolonContent(Function<String, RequestContext> requestFactory) {
RequestContext request = requestFactory.apply(VIEW_NAME + ";a=A;b=B");
assertViewName(request, VIEW_NAME);
}
use of cn.taketoday.web.RequestContext in project today-infrastructure by TAKETODAY.
the class DefaultRequestToViewNameTranslatorTests method testGetViewNameWithDefaultConfiguration.
@PathPatternsParameterizedTest
void testGetViewNameWithDefaultConfiguration(Function<String, RequestContext> requestFactory) {
RequestContext request = requestFactory.apply(VIEW_NAME + EXTENSION);
assertViewName(request, VIEW_NAME);
}
Aggregations