I did manage to get mine working. For future users searching this (and in
case somebody spots some way of doing it better):
@ExtendWith(DropwizardExtensionsSupport.class)
class ExportResourceTest {
// @formatter:off
public static final ResourceExtension resource = ResourceExtension.
builder()
.addResource(new ExportResource())
.addResource(new AbstractBinder() {
@Override
protected void configure() {
bind(mock(Subject.class)).to(Subject.class);
}
}).build(); // @formatter:on
@Test
void test() {
Response response = resource.target("/some/path").request().get();
assertThat(response.getStatusInfo().getFamily()).isEqualTo(Family.SUCCESSFUL);
}
did the trick for me
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.