Revision e788634d
Added by Andreas Kohlbecker over 2 years ago
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/EmailSendTest.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.cdm.api.service; |
10 | 10 |
|
11 | 11 |
import static org.junit.Assert.assertEquals; |
12 |
import static org.junit.Assert.assertNotNull; |
|
13 |
import static org.junit.Assert.assertTrue; |
|
12 | 14 |
|
13 | 15 |
import java.io.FileNotFoundException; |
14 | 16 |
import java.util.Objects; |
... | ... | |
57 | 59 |
} |
58 | 60 |
|
59 | 61 |
String from = env.getProperty(SendEmailConfigurer.FROM_ADDRESS); |
62 |
assertNotNull(from); |
|
63 |
assertTrue(from.contains("@")); |
|
60 | 64 |
|
61 | 65 |
boolean useWiser = Objects.equals(env.getProperty(SendEmailConfigurer.INT_TEST_SERVER), "wiser"); |
62 | 66 |
Wiser wiser = null; |
63 | 67 |
if(useWiser) { |
64 | 68 |
// start test smtp server |
65 | 69 |
wiser = new Wiser(); |
66 |
wiser.setPort(2500); // Default is 25
|
|
70 |
wiser.setPort(2500); // better use random port
|
|
67 | 71 |
wiser.start(); |
68 | 72 |
} |
69 | 73 |
|
Also available in: Unified diff
ref #9758 switching to other javax.mail implementation (step 2) and fixing port issues in test