Produced by Araxis Merge on 11/14/2017 6:57:21 AM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | cbs.zip\cbs\cbs\src\test\java\gov\va\cpss\service | EmailServiceIT.java | Thu Nov 9 14:19:48 2017 UTC |
| 2 | cbs.zip\cbs\cbs\src\test\java\gov\va\cpss\service | EmailServiceIT.java | Tue Nov 14 12:28:52 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 102 |
| Changed | 2 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | package go v.va.cpss. service; | |
| 2 | ||
| 3 | import sta tic org.ju nit.Assert .assertTru e; | |
| 4 | import sta tic org.ju nit.Assert .fail; | |
| 5 | ||
| 6 | import jav a.util.Ite rator; | |
| 7 | ||
| 8 | import org .junit.Tes t; | |
| 9 | import org .junit.run ner.RunWit h; | |
| 10 | import org .springfra mework.bea ns.factory .annotatio n.Autowire d; | |
| 11 | import org .springfra mework.tes t.context. ContextCon figuration ; | |
| 12 | import org .springfra mework.tes t.context. junit4.Spr ingJUnit4C lassRunner ; | |
| 13 | ||
| 14 | import com .dumbster. smtp.SmtpM essage; | |
| 15 | ||
| 16 | import gov .va.cpss.e mail.MockE mailServer ; | |
| 17 | ||
| 18 | /** | |
| 19 | * Integra tion Unit Tests to t est succes s and fail ure cases of EmailSe rvice | |
| 20 | * | |
| 21 | * @author DN S BROWNL | |
| 22 | */ | |
| 23 | @RunWith(S pringJUnit 4ClassRunn er.class) | |
| 24 | @ContextCo nfiguratio n(location s = { "/te st-context .xml", "/t est-email- server.xml ", "/cpss- email.xml" }) | |
| 25 | public cla ss EmailSe rviceIT { | |
| 26 | ||
| 27 | @A utowired | |
| 28 | pr ivate Emai lService e mailServic e; | |
| 29 | ||
| 30 | @A utowired | |
| 31 | pr ivate Mock EmailServe r<SmtpMess age> mockE mailServer ; | |
| 32 | ||
| 33 | @T est | |
| 34 | pu blic final void test DumbsterEm ail() { | |
| 35 | ||
| 36 | try { | |
| 37 | emailServi ce.cpssRea dyToSendEm ail(" PII ", "CBSS S ubject!", | |
| 38 | "CBSS mess age --- T his is act ual messag e"); | |
| 39 | } ca tch (Excep tion e) { | |
| 40 | e.prin tStackTrac e(); | |
| 41 | fail(" Unexpected exception : " + e); | |
| 42 | } | |
| 43 | ||
| 44 | asse rtTrue(moc kEmailServ er.getRece ivedEmailS ize() == 1 ); | |
| 45 | Iter ator<SmtpM essage> em ailIter = mockEmailS erver.getR eceivedEma il(); | |
| 46 | Smtp Message em ail = emai lIter.next (); | |
| 47 | // S et Subject : header f ield | |
| 48 | asse rtTrue(ema il.getHead erValue("S ubject").e quals("CBS S Subject! ")); | |
| 49 | // N ow set the actual me ssage | |
| 50 | asse rtTrue(ema il.getBody ().equals( "CBSS mess age --- T his is act ual messag e")); | |
| 51 | } | |
| 52 | ||
| 53 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.