Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.14 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.14 KB

dropwizard-junit

a JUnit TestRunner that allows to load Dropwizard 0.8 resources for testing

NOTE: for Dropwizard 0.7.x compatibility use project version 0.5

License

http://www.apache.org/licenses/LICENSE-2.0

How to use it

  • Add the Maven dependency (now available in Maven Central!)

      <dependency>
          <groupId>io.federecio</groupId>
          <artifactId>dropwizard-junit</artifactId>
          <version>0.6</version>
          <scope>test</scope>
      </dependency>
    

Note: you will need to add the junit dependency to your project

  • Write your tests

      @RunWith(DropwizardJunitRunner.class)
      @DropwizardTestConfig(applicationClass = YourServiceClass.class, yamlFile = "/yourconfig.yaml")
      public class YourTest {
          // cool tests here - your Dropwizard service has been started
      }
    

Contributors