Skip to content

Instantly share code, notes, and snippets.

@vcatalano
Created March 10, 2017 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vcatalano/faae868c6f5de5b56f32195206243afb to your computer and use it in GitHub Desktop.
Save vcatalano/faae868c6f5de5b56f32195206243afb to your computer and use it in GitHub Desktop.
public class RegistrationExampleServiceTest {
@Rule
public DBITestRule database = new DBITestRule();
@Test(expected = RegistrationException.class)
public void testUserRegistration() throws RegistrationException {
UserDAO userDAO = database.getDbi().onDemand(UserDAO.class);
RegistrationExampleService service = database.getDbi().onDemand(RegistrationExampleService.class);
User user = new User("test@email.com", "password");
userDAO.insert(user);
service.createUser("google.com", "test@email.com", "pass");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment