Produced by Araxis Merge on 12/8/2017 1:33:40 PM 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 | PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\test\java\gov\va\med\fee\service\impl | PayToProviderServiceImplTest.java | Fri Dec 8 17:51:34 2017 UTC |
| 2 | PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\test\java\gov\va\med\fee\service\impl | PayToProviderServiceImplTest.java | Fri Dec 8 18:59:21 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 174 |
| 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 | /** | |
| 2 | * | |
| 3 | */ | |
| 4 | package go v.va.med.f ee.service .impl; | |
| 5 | ||
| 6 | import sta tic org.ha mcrest.Mat chers.is; | |
| 7 | import sta tic org.ju nit.Assert .assertNot Null; | |
| 8 | import sta tic org.ju nit.Assert .assertTha t; | |
| 9 | ||
| 10 | import org .junit.Ass ert; | |
| 11 | import org .junit.Bef ore; | |
| 12 | import org .junit.Tes t; | |
| 13 | import org .junit.run ner.RunWit h; | |
| 14 | import org .mockito.M ock; | |
| 15 | import org .mockito.M ockito; | |
| 16 | import org .mockito.r unners.Moc kitoJUnitR unner; | |
| 17 | ||
| 18 | import gov .va.med.do main.fee.C laimProced ure; | |
| 19 | import gov .va.med.do main.fee.P roviderInf o; | |
| 20 | import gov .va.med.do main.fee.P roviderTyp e; | |
| 21 | import gov .va.med.fe e.dao.IPay ToAndServi ceProvider Repository ; | |
| 22 | import gov .va.med.fe e.exceptio ns.Generic Exception; | |
| 23 | ||
| 24 | /** | |
| 25 | * @author Vamsi Kri shna Ganga rapu | |
| 26 | * | |
| 27 | */ | |
| 28 | @RunWith(M ockitoJUni tRunner.cl ass) | |
| 29 | public cla ss PayToPr oviderServ iceImplTes t extends AbstractCl aimService ImplTest { | |
| 30 | ||
| 31 | @M ock | |
| 32 | pr ivate Prov iderInfoSe rviceImpl payToProvi derService ImplMock; | |
| 33 | ||
| 34 | @M ock | |
| 35 | pr ivate IPay ToAndServi ceProvider Repository iPayToPro viderRepos itoryMock; | |
| 36 | ||
| 37 | @B efore | |
| 38 | pu blic void setup() th rows Gener icExceptio n { | |
| 39 | payT oProviderS erviceImpl Mock = new ProviderI nfoService Impl(); | |
| 40 | ||
| 41 | iPay ToProvider Repository Mock = Moc kito.mock( IPayToAndS erviceProv iderReposi tory.class ); | |
| 42 | payT oProviderS erviceImpl Mock.setPa yToAndServ iceProvide Repository (iPayToPro viderRepos itoryMock) ; | |
| 43 | } | |
| 44 | ||
| 45 | @T est | |
| 46 | pu blic void testMockIs Working() { | |
| 47 | asse rtNotNull( "Pay To Pr ovider Ser vice Injec tion Faile d", payToP roviderSer viceImplMo ck); | |
| 48 | asse rtNotNull( "IPayToPro viderRepos itory Inje ction Fail ed", iPayT oProviderR epositoryM ock); | |
| 49 | } | |
| 50 | ||
| 51 | // Refactored by Eyuel Taddese 6/ 19/2017 | |
| 52 | /* * | |
| 53 | * @author DN S TADDEE | |
| 54 | * The test make sure that payTo ProviderIn fo is retu rning the | |
| 55 | * / | |
| 56 | @T est | |
| 57 | pu blic void testGetPay ToProvider Info_Suces s() { | |
| 58 | // S etup | |
| 59 | /*Da te service Date = new Gregorian Calendar(2 009, Calen dar.JANUAR Y, 22).get Time(); | |
| 60 | Date visinCrea teDate = n ew Gregori anCalendar (2000, Cal endar.MARC H, 30).get Time(); | |
| 61 | Date providerC reatedDate = new Gre gorianCale ndar(2000, Calendar. MAY, 30).g etTime(); | |
| 62 | //Da te bankCre atedDate = new Grego rianCalend ar(1990, C alendar.AP RIL, 30).g etTime(); | |
| 63 | Date dateCreat ed = new G regorianCa lendar(199 0, Calenda r.APRIL, 3 0).getTime (); | |
| 64 | ||
| 65 | Serv iceType se rviceType = new Serv iceType("P ROF", serv iceDate, " User1"); | |
| 66 | Visn visn = ne w Visn(Lon g.valueOf( 1000), "Us er1", visi nCreateDat e); | |
| 67 | Clai m claim = new Claim( Long.value Of(9999), serviceTyp e, visn, " C001", 'T' );*/ | |
| 68 | ||
| 69 | Prov iderType p roviderTyp e = new Pr oviderType ("PAY TO P ROVIDER", providerCr eatedDate, "VA"); | |
| 70 | Clai mProcedure claimProc edure = ne w ClaimPro cedure(Lon g.valueOf( 1000), cla im, servic eType, Lon g.valueOf( 1000), | |
| 71 | Long.val ueOf(1000) , "Test", "N", "VA U SA", dateC reated); | |
| 72 | Prov iderInfo p roviderInf o = new Pr oviderInfo (Long.valu eOf(1000), claim, cl aimProcedu re, provid erType, | |
| 73 | "VA USA" , "VA USA" , "VA USA" , "Doe", " John", "jo hnny", "jr .", "Sarno Plaza", " Sarno Road ", "Melbou rne", | |
| 74 | "Florida", "32935", "John Doe" , "9999999 999", "912 345678", " john.doe@ DOMAIN ", Long.va lueOf(1000 ), dateCre ated, "VA USA"); | |
| 75 | ||
| 76 | /*Li st<Provide rInfo> pay ToProvider s = new Ar rayList<>( ); | |
| 77 | payT oProviders .add(provi derInfo);* / | |
| 78 | ||
| 79 | Mock ito.when(i PayToProvi derReposit oryMock.fi ndOneByTyp e(claim.ge tClaimInde x(), "PAY TO PROVIDE R")) | |
| 80 | .thenRet urn(provid erInfo); | |
| 81 | try { | |
| 82 | Provid erInfo res ultSet = p ayToProvid erServiceI mplMock.ge tPayToAndS erviceInfo (claim.get ClaimIndex (), "PAY T O PROVIDER "); | |
| 83 | assert That(provi derInfo, i s(resultSe t)); | |
| 84 | } ca tch (Excep tion e) { | |
| 85 | Assert .fail("Tes t case fai led due to "+e.getMe ssage()); | |
| 86 | } | |
| 87 | } | |
| 88 | ||
| 89 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.