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 | ServiceProviderServiceImplTest.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 | ServiceProviderServiceImplTest.java | Fri Dec 8 19:03:26 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 162 |
| Changed | 1 | 2 |
| 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.ju nit.Assert .assertEqu als; | |
| 7 | import sta tic org.ju nit.Assert .assertNot Null; | |
| 8 | ||
| 9 | import org .apache.lo gging.log4 j.LogManag er; | |
| 10 | import org .apache.lo gging.log4 j.Logger; | |
| 11 | import org .junit.Bef ore; | |
| 12 | import org .junit.Tes t; | |
| 13 | import org .junit.run ner.RunWit h; | |
| 14 | import org .mockito.I njectMocks ; | |
| 15 | import org .mockito.M ock; | |
| 16 | import org .mockito.M ockito; | |
| 17 | import org .mockito.r unners.Moc kitoJUnitR unner; | |
| 18 | ||
| 19 | import gov .va.med.do main.fee.C laimProced ure; | |
| 20 | import gov .va.med.do main.fee.P roviderInf o; | |
| 21 | import gov .va.med.do main.fee.P roviderTyp e; | |
| 22 | import gov .va.med.fe e.dao.IPay ToAndServi ceProvider Repository ; | |
| 23 | import gov .va.med.fe e.exceptio ns.Generic Exception; | |
| 24 | ||
| 25 | /** | |
| 26 | * @author Vamsi Kri shna Ganga rapu | |
| 27 | * | |
| 28 | */ | |
| 29 | @RunWith(M ockitoJUni tRunner.cl ass) | |
| 30 | public cla ss Service ProviderSe rviceImplT est extend s Abstract ClaimServi ceImplTest { | |
| 31 | ||
| 32 | pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Serv iceProvide rServiceIm plTest.cla ss); | |
| 33 | ||
| 34 | @I njectMocks | |
| 35 | pr ivate Prov iderInfoSe rviceImpl payToProvi derService ImplMock; | |
| 36 | ||
| 37 | @M ock | |
| 38 | pr ivate IPay ToAndServi ceProvider Repository iServiceP roviderRep ositoryMoc k; | |
| 39 | ||
| 40 | @B efore | |
| 41 | pu blic void setup() th rows Gener icExceptio n { | |
| 42 | // L ong claimI ndex = 1L; | |
| 43 | ||
| 44 | payT oProviderS erviceImpl Mock = new ProviderI nfoService Impl(); | |
| 45 | ||
| 46 | iSer viceProvid erReposito ryMock = M ockito.moc k(IPayToAn dServicePr oviderRepo sitory.cla ss); | |
| 47 | payT oProviderS erviceImpl Mock.setPa yToAndServ iceProvide Repository (iServiceP roviderRep ositoryMoc k); | |
| 48 | } | |
| 49 | ||
| 50 | @T est | |
| 51 | pu blic void testMockIs Working() { | |
| 52 | asse rtNotNull( "Pay To Pr ovider Ser vice Injec tion Faile d", payToP roviderSer viceImplMo ck); | |
| 53 | asse rtNotNull( "IPayToPro viderRepos itory Inje ction Fail ed", iServ iceProvide rRepositor yMock); | |
| 54 | } | |
| 55 | ||
| 56 | @T est | |
| 57 | pu blic void testGetPay ToProvider Info() { | |
| 58 | // S etup | |
| 59 | ||
| 60 | Prov iderType p roviderTyp e = new Pr oviderType ("SERVICE LOCATION", providerC reatedDate , "VA"); | |
| 61 | Clai mProcedure claimProc edure = ne w ClaimPro cedure(Lon g.valueOf( 1000), cla im, servic eType, Lon g.valueOf( 1000), | |
| 62 | Long.val ueOf(1000) , "Test", "N", "VA U SA", dateC reated); | |
| 63 | Prov iderInfo p roviderInf o = new Pr oviderInfo (Long.valu eOf(1000), claim, cl aimProcedu re, provid erType, | |
| 64 | "VA USA" , "VA USA" , "VA USA" , "Doe", " John", "jo hnny", "jr .", "Sarno Plaza", " Sarno Road ", "Melbou rne", | |
| 65 | "Florida", "32935", "John Doe" , "9999999 999", "912 345678", " john.doe@ DOMAIN ", Long.va lueOf(1000 ), dateCre ated, "VA USA"); | |
| 66 | ||
| 67 | Mock ito.when(i ServicePro viderRepos itoryMock. findOneByT ype(claim. getClaimIn dex(), "SE RVICE LOCA TION")) | |
| 68 | .thenRet urn(provid erInfo); | |
| 69 | ||
| 70 | try { | |
| 71 | //Clai msProvider Response r esultSet = payToProv iderServic eImplMock. getPayToPr oviderResp onseInfo(L ong.valueO f(9999)); | |
| 72 | Provid erInfo res ultSet = p ayToProvid erServiceI mplMock.ge tPayToAndS erviceInfo (claim.get ClaimIndex (), "SERVI CE LOCATIO N"); | |
| 73 | ||
| 74 | assert Equals(pro viderInfo, resultSet ); | |
| 75 | logger .info("Tes t case pas sed with n o exceptio ns"); | |
| 76 | ||
| 77 | } ca tch (Excep tion e) { | |
| 78 | System .out.print ln("Except ion is: " + e); | |
| 79 | logger .info("Exc eption is: " + e); | |
| 80 | } | |
| 81 | } | |
| 82 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.