From 55ed5ac76460f324aa26aa6149a3074f424a0dd4 Mon Sep 17 00:00:00 2001 From: Simon Ebner Date: Fri, 4 Oct 2013 14:12:18 +0200 Subject: [PATCH] Upgraded mail libraries to latest version --- ch.psi.fda/pom.xml | 6 +- .../notification/NotificationAgentTest.java | 56 +++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 ch.psi.fda/src/test/java/ch/psi/fda/notification/NotificationAgentTest.java diff --git a/ch.psi.fda/pom.xml b/ch.psi.fda/pom.xml index d614898..73e7ad5 100644 --- a/ch.psi.fda/pom.xml +++ b/ch.psi.fda/pom.xml @@ -65,9 +65,9 @@ - javax.mail - mail - 1.4.1 + com.sun.mail + javax.mail + 1.5.0 diff --git a/ch.psi.fda/src/test/java/ch/psi/fda/notification/NotificationAgentTest.java b/ch.psi.fda/src/test/java/ch/psi/fda/notification/NotificationAgentTest.java new file mode 100644 index 0000000..6cf3596 --- /dev/null +++ b/ch.psi.fda/src/test/java/ch/psi/fda/notification/NotificationAgentTest.java @@ -0,0 +1,56 @@ +/** + * + * Copyright 2013 Paul Scherrer Institute. All rights reserved. + * + * This code is free software: you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) any + * later version. + * + * This code is distributed in the hope that it will be useful, but without any + * warranty; without even the implied warranty of merchantability or fitness for + * a particular purpose. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + * + */ +package ch.psi.fda.notification; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import ch.psi.fda.model.v1.Recipient; + +/** + * @author ebner + * + */ +public class NotificationAgentTest { + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + @Test + public void testSendNotification() { + NotificationAgent a = new NotificationAgent("mail.psi.ch", "supertoll@psi.ch"); + Recipient r = new Recipient(); + r.setValue("simon.ebner@psi.ch"); + a.getRecipients().add(r); + a.sendNotification("super","hello worl this is a test", true, true); + } + +}