本文整理汇总了Java中br.org.owail.sender.email.Email类的典型用法代码示例。如果您正苦于以下问题:Java Email类的具体用法?Java Email怎么用?Java Email使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Email类属于br.org.owail.sender.email包,在下文中一共展示了Email类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import br.org.owail.sender.email.Email; //导入依赖的package包/类
@Before
public void setup() throws Exception {
PowerMockito.whenNew(Email.class).withNoArguments().thenReturn(emailMock);
PowerMockito.whenNew(GTLSProperties.class).withNoArguments().thenReturn(propertiesMock);
PowerMockito.mockStatic(EmailCompositionException.class);
PowerMockito.mockStatic(Transport.class);
PowerMockito.mockStatic(MessageWrapper.class);
Mockito.when(emailMock.getFrom()).thenReturn(senderMock);
Mockito.when(emailMock.getRecipients()).thenReturn(constructRecipientList());
Mockito.when(emailMock.getMessageText()).thenReturn(stringMock);
Mockito.when(MessageWrapper.wrap(emailMock, propertiesMock, Mailer.HTML)).thenReturn(messageMock);
}
示例2: createNewUserGreetingsEmail_method_should_return_an_email_with_recipient_defined
import br.org.owail.sender.email.Email; //导入依赖的package包/类
@Test
public void createNewUserGreetingsEmail_method_should_return_an_email_with_recipient_defined() {
Email email = OtusEmailFactory.createNewUserGreetingsEmail(sender, recipient);
assertThat(email.getRecipients(), not(empty()));
}
示例3: createNewUserGreetingsEmail_method_should_return_an_email_with_from_defined
import br.org.owail.sender.email.Email; //导入依赖的package包/类
@Test
public void createNewUserGreetingsEmail_method_should_return_an_email_with_from_defined() {
Email email = OtusEmailFactory.createNewUserGreetingsEmail(sender, recipient);
assertThat(email.getFrom(), notNullValue());
}
示例4: createNewUserGreetingsEmail_method_should_return_an_email_with_subject_defined
import br.org.owail.sender.email.Email; //导入依赖的package包/类
public void createNewUserGreetingsEmail_method_should_return_an_email_with_subject_defined() {
Email email = OtusEmailFactory.createNewUserGreetingsEmail(sender, recipient);
assertThat(email.getSubject(), equalTo(SUBJECT));
}
示例5: createNewUserNotificationEmail_method_should_return_an_email_with_recipient_defined
import br.org.owail.sender.email.Email; //导入依赖的package包/类
@Test
public void createNewUserNotificationEmail_method_should_return_an_email_with_recipient_defined() {
Email email = OtusEmailFactory.createNewUserNotificationEmail(sender, recipient, user);
assertThat(email.getRecipients(), not(empty()));
}
示例6: createNewUserNotificationEmail_method_should_return_an_email_with_from_defined
import br.org.owail.sender.email.Email; //导入依赖的package包/类
@Test
public void createNewUserNotificationEmail_method_should_return_an_email_with_from_defined() {
Email email = OtusEmailFactory.createNewUserNotificationEmail(sender, recipient, user);
assertThat(email.getFrom(), notNullValue());
}
示例7: createNewUserNotificationEmail_method_should_return_an_email_with_subject_defined
import br.org.owail.sender.email.Email; //导入依赖的package包/类
public void createNewUserNotificationEmail_method_should_return_an_email_with_subject_defined() {
Email email = OtusEmailFactory.createNewUserNotificationEmail(sender, recipient, user);
assertThat(email.getSubject(), equalTo(SUBJECT));
}
示例8: createSystemInstallationEmail_method_should_return_an_email_with_recipient_defined
import br.org.owail.sender.email.Email; //导入依赖的package包/类
@Test
public void createSystemInstallationEmail_method_should_return_an_email_with_recipient_defined() {
Email email = OtusEmailFactory.createSystemInstallationEmail(sender, recipient);
assertThat(email.getRecipients(), not(empty()));
}
示例9: createSystemInstallationEmail_method_should_return_an_email_with_from_defined
import br.org.owail.sender.email.Email; //导入依赖的package包/类
@Test
public void createSystemInstallationEmail_method_should_return_an_email_with_from_defined() {
Email email = OtusEmailFactory.createSystemInstallationEmail(sender, recipient);
assertThat(email.getFrom(), notNullValue());
}