use of org.activityinfo.server.util.MailingListClient in project activityinfo by bedatadriven.
the class ConfirmInviteControllerTest method setup.
@Before
public final void setup() {
user = new User();
userDAO = createMock(UserDAO.class);
expect(userDAO.findUserByChangePasswordKey(eq(VALID_KEY))).andReturn(user);
expect(userDAO.findUserByChangePasswordKey(EasyMock.not(eq(VALID_KEY)))).andThrow(new NoResultException());
replay(userDAO);
AuthenticationDAO authDAO = createMock(AuthenticationDAO.class);
authDAO.persist(isA(Authentication.class));
expectLastCall().anyTimes();
MailingListClient mailingListClient = createNiceMock(MailingListClient.class);
replay(mailingListClient);
AuthTokenProvider authTokenProvider = new AuthTokenProvider(Providers.of(authDAO));
resource = new ConfirmInviteController(Providers.of(userDAO), authTokenProvider, mailingListClient);
}
Aggregations