Package com.agiletec.plugins.jpmail.mock.messages

Examples of com.agiletec.plugins.jpmail.mock.messages.MockMessageHandler


 
  public void testSendMail() throws Throwable {
    String[] mailAddresses = JpmailTestHelper.MAIL_ADDRESSES;
    this._mailManager.sendMail(MAIL_TEXT, "Mail semplice", mailAddresses, mailAddresses, mailAddresses, SENDER_CODE);
   
    MockMessageHandler messageHandler = this._myFactory.getMessageHandler();
    List<MockMailMessage> messages = messageHandler.getMessages();
   
    assertNotNull(messages);
    assertEquals(1, messages.size());
   
  }
View Full Code Here


 
  public void testSendMailWithContentType() throws Throwable {
    this._mailManager.sendMail(MAIL_TEXT, "Mail with contentType text/html",
        JpmailTestHelper.MAIL_ADDRESSES, null, null, SENDER_CODE, IMailManager.CONTENTTYPE_TEXT_HTML);
   
    MockMessageHandler messageHandler = this._myFactory.getMessageHandler();
    List<MockMailMessage> messages = messageHandler.getMessages();
   
    assertNotNull(messages);
    assertEquals(1, messages.size());
   
    this._mailManager.sendMail(MAIL_TEXT, "Mail with contentType text/plain",
        null, JpmailTestHelper.MAIL_ADDRESSES, null, SENDER_CODE, IMailManager.CONTENTTYPE_TEXT_PLAIN);
   
    messages = messageHandler.getMessages();
   
    assertNotNull(messages);
    assertEquals(2, messages.size());
  }
View Full Code Here

    Properties attachments = new Properties();
    attachments.setProperty("ALLEGATO", "target/test/entando_logo.jpg");
    this._mailManager.sendMail(MAIL_TEXT, "Mail with attachment & text html",
        IMailManager.CONTENTTYPE_TEXT_HTML, attachments, JpmailTestHelper.MAIL_ADDRESSES, null, null, SENDER_CODE);
   
    MockMessageHandler messageHandler = this._myFactory.getMessageHandler();
    List<MockMailMessage> messages = messageHandler.getMessages();
   
    assertNotNull(messages);
    assertEquals(1, messages.size());
   
    this._mailManager.sendMail(MAIL_TEXT, "Mail with void attachment & text plain",
        IMailManager.CONTENTTYPE_TEXT_PLAIN, null, null, null, JpmailTestHelper.MAIL_ADDRESSES, SENDER_CODE);
   
    messages = messageHandler.getMessages();
   
    assertNotNull(messages);
    assertEquals(2, messages.size());
  }
View Full Code Here

    attachments.setProperty("ALLEGATO", "target/test/entando_logo.jpg");
    String[] mailAddresses = JpmailTestHelper.MAIL_ADDRESSES;
    this._mailManager.sendMixedMail("AAAAAAAAAMixed"+MAIL_TEXT, "Mixed"+MAIL_TEXT, "Oggetto Mail composta",
        attachments, mailAddresses, mailAddresses, mailAddresses, SENDER_CODE);
   
    MockMessageHandler messageHandler = this._myFactory.getMessageHandler();
    List<MockMailMessage> messages = messageHandler.getMessages();
   
    assertNotNull(messages);
    assertEquals(1, messages.size());
  }
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpmail.mock.messages.MockMessageHandler

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.