-
-
Save ryctabo/07e7c6f2bffc601f3f091193075b662e to your computer and use it in GitHub Desktop.
Unit testing with Jersey Test Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyResourceTest extends JerseyTest { | |
@Override | |
protected Application configure() { | |
return new ResourceConfig(MyResource.class); | |
} | |
@Test | |
public void testGetIt() { | |
String response = target().path("myresource").request().get(String.class); | |
Assert.assertEquals("Got it!", response); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment