Package com.changestuffs.shared.actions

Examples of com.changestuffs.shared.actions.SendInvitation


    placeManager.revealPlace(request, true);
  }

  @Override
  public void sendInvitation(final String email) {
    dispatcher.execute(new SendInvitation(email), new AsyncCallback<SendInvitationResult>() {
      @Override
      public void onFailure(Throwable caught) {
        GWT.log("Error doing SendInvitation", caught);
        getView().invitationSent(email, false);
      }
View Full Code Here


  @Test(expected = ConstraintViolationException.class)
  public void notAllowedEmail() throws ActionException {
    SendInvitationActionHandler handler = injector
        .getInstance(SendInvitationActionHandler.class);
    handler.execute(new SendInvitation("dsfdsf.com@"),
        mock(ExecutionContext.class));
  }
View Full Code Here

  @Test
  public void inviteNotRegistered() throws ActionException {
    final String invite = "pablo@gmail.com";
    SendInvitationActionHandler handler = injector.getInstance(SendInvitationActionHandler.class);
    SendInvitationResult result = handler.execute(new SendInvitation(invite), mock(ExecutionContext.class));
    assertEquals(true, result.isSent());
    User pablo = appEntity.find(User.class, invite);
    assertNotNull(pablo);
    assertNotNull(pablo.getUserId());
    assertEquals(UserBeanOAM.AUTH_DOMAIN_NOT_REGISTERED, pablo.getAuthDomain());
View Full Code Here

  }
 
  private void registeredUserChecks(boolean receiveEmails) throws ActionException{
    User registered = persistUser(receiveEmails);
    SendInvitationActionHandler handler = injector.getInstance(SendInvitationActionHandler.class);
    SendInvitationResult result = handler.execute(new SendInvitation(registered.getEmail()), mock(ExecutionContext.class));
    assertEquals(true, result.isSent());
    User fromDb = appEntity.find(User.class, registered.getEmail());
    assertNotNull(fromDb);
    assertEquals(registered.getUserId(), fromDb.getUserId());
    assertEquals(registered.getAuthDomain(), fromDb.getAuthDomain());
View Full Code Here

TOP

Related Classes of com.changestuffs.shared.actions.SendInvitation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.