Skip to content

Instantly share code, notes, and snippets.

@stephan-mueller
Created September 28, 2015 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephan-mueller/a19dd06566f79ec335d5 to your computer and use it in GitHub Desktop.
Save stephan-mueller/a19dd06566f79ec335d5 to your computer and use it in GitHub Desktop.
Arquillian test for the cdi service {@link MailService}.
@RunWith(Arquillian.class)
public class MailServiceIT {
private static final Logger LOG = LoggerFactory.getLogger(MailServiceIT.class);
@Deployment
public static Archive createDeployment() {
WebArchive archive = ShrinkWrap.create(WebArchive.class)
.addClass(MailService.class);
LOG.debug(archive.toString(true));
return archive;
}
@Inject
private MailService service;
@Test
public void sendMail() throws Exception {
service.sendMail("Testmail", "This is a test", "max.mustermann@openknowledge.de");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment