当前位置: 首页>>代码示例>>Java>>正文


Java Email类代码示例

本文整理汇总了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);
   }
 
开发者ID:ccem-dev,项目名称:owail,代码行数:16,代码来源:GMailerTest.java

示例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()));
}
 
开发者ID:ccem-dev,项目名称:otus-api,代码行数:7,代码来源:OtusNewUserGreetingsEmailTest.java

示例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());
}
 
开发者ID:ccem-dev,项目名称:otus-api,代码行数:7,代码来源:OtusNewUserGreetingsEmailTest.java

示例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));
}
 
开发者ID:ccem-dev,项目名称:otus-api,代码行数:6,代码来源:OtusNewUserGreetingsEmailTest.java

示例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()));
}
 
开发者ID:ccem-dev,项目名称:otus-api,代码行数:7,代码来源:OtusNewUserNotificationEmailTest.java

示例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());
}
 
开发者ID:ccem-dev,项目名称:otus-api,代码行数:7,代码来源:OtusNewUserNotificationEmailTest.java

示例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));
}
 
开发者ID:ccem-dev,项目名称:otus-api,代码行数:6,代码来源:OtusNewUserNotificationEmailTest.java

示例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()));
}
 
开发者ID:ccem-dev,项目名称:otus-api,代码行数:7,代码来源:OtusSystemInstallationEmailTest.java

示例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());
}
 
开发者ID:ccem-dev,项目名称:otus-api,代码行数:7,代码来源:OtusSystemInstallationEmailTest.java


注:本文中的br.org.owail.sender.email.Email类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。