Closed gbourant closed 6 months ago
fixes #181
With this way i can use a mock for UriInfo.
UriInfo
UriBuilder uriBuilder = UriBuilder.fromUri("https://gbourant.com"); UriInfo mock = Mockito.mock(UriInfo.class); when(mock.getBaseUriBuilder()).thenReturn( uriBuilder); Router.uriInfoSupplier = () -> mock;
Maybe we can do better, if ControllerVisitor can detect that we are under a test and provide a default UriBuilder so the mock is no more needed?
ControllerVisitor
fixes #181
With this way i can use a mock for
UriInfo
.Maybe we can do better, if
ControllerVisitor
can detect that we are under a test and provide a default UriBuilder so the mock is no more needed?