Support custom UriTemplateHandler in LocalHostUriTemplateHandler

See gh-13208
This commit is contained in:
Mihhail Lapushkin
2018-05-18 11:31:51 +03:00
committed by Stephane Nicoll
parent 48cf025093
commit d31dbac69e
2 changed files with 22 additions and 1 deletions

View File

@@ -50,6 +50,13 @@ public class LocalHostUriTemplateHandlerTests {
new LocalHostUriTemplateHandler(new MockEnvironment(), null);
}
@Test
public void createWhenHandlerIsNullShouldThrowException() {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("Handler must not be null");
new LocalHostUriTemplateHandler(new MockEnvironment(), "http", null);
}
@Test
public void getRootUriShouldUseLocalServerPort() {
MockEnvironment environment = new MockEnvironment();