Created
March 10, 2017 20:07
-
-
Save vcatalano/faae868c6f5de5b56f32195206243afb to your computer and use it in GitHub Desktop.
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 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("[email protected]", "password"); | |
userDAO.insert(user); | |
service.createUser("google.com", "[email protected]", "pass"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment