Package com.changestuffs.shared.actions

Examples of com.changestuffs.shared.actions.SendInvitationResult


      } catch (MessagingException|IOException e) {
        emailSent = false;
        log.log(Level.WARNING, "Error sending email", e);
      }
    }
    return new SendInvitationResult(emailSent);
  }
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());
    assertEquals(true, pablo.isReceiveEmails());
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());
    assertEquals(receiveEmails, fromDb.isReceiveEmails());
View Full Code Here

TOP

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

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.