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 | BillingProviderServiceImplTest.java | Fri Dec 8 17:51:36 2017 UTC |
| 2 | PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\test\java\gov\va\med\fee\service\impl | BillingProviderServiceImplTest.java | Fri Dec 8 18:58:31 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 166 |
| 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.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 g ov.va.med. domain.fee .PlaceOfSe rvice; | |
| 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.constant s.ClaimDet ailsConsta nts; | |
| 23 | import gov .va.med.fe e.dao.IBil lingReposi toryTempla te; | |
| 24 | import gov .va.med.fe e.exceptio ns.Generic Exception; | |
| 25 | import gov .va.med.fe e.model.re sponse.Pro viderInfoR esponse; | |
| 26 | ||
| 27 | /** | |
| 28 | * @author Vamsi Kri shna Ganga rapu | |
| 29 | * | |
| 30 | */ | |
| 31 | @RunWith(M ockitoJUni tRunner.cl ass) | |
| 32 | public cla ss Billing ProviderSe rviceImplT est extend s Abstract ClaimServi ceImplTest { | |
| 33 | ||
| 34 | pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Bill ingProvide rServiceIm plTest.cla ss); | |
| 35 | ||
| 36 | @M ock | |
| 37 | pr ivate Bill ingProvide rServiceIm pl billing ProviderSe rviceImplM ock; | |
| 38 | ||
| 39 | @M ock | |
| 40 | pr ivate IBil lingReposi toryTempla te iBillin gProviderR epositoryM ock; | |
| 41 | ||
| 42 | @B efore | |
| 43 | pu blic void setup() th rows Gener icExceptio n { | |
| 44 | bill ingProvide rServiceIm plMock = n ew Billing ProviderSe rviceImpl( ); | |
| 45 | iBil lingProvid erReposito ryMock = M ockito.moc k(IBilling Repository Template.c lass); | |
| 46 | bill ingProvide rServiceIm plMock.set iBillingPr oviderRepo sitory(iBi llingProvi derReposit oryMock); | |
| 47 | } | |
| 48 | ||
| 49 | @T est | |
| 50 | pu blic void testMockIs Working() { | |
| 51 | asse rtNotNull( "Billing P rovider Se rvice Inje ction Fail ed", billi ngProvider ServiceImp lMock); | |
| 52 | asse rtNotNull( "Billing P rovider Re pository I njection F ailed", iB illingProv iderReposi toryMock); | |
| 53 | } | |
| 54 | ||
| 55 | @T est | |
| 56 | pu blic void testGetBil lingProvid erInfo() { | |
| 57 | Prov iderType p roviderTyp e = new Pr oviderType ("BILLING PROVIDER", providerC reatedDate , "VA"); | |
| 58 | Clai mProcedure claimProc edure = ne w ClaimPro cedure(Lon g.valueOf( 1000), cla im, servic eType, Lon g.valueOf( 1000), | |
| 59 | Long.val ueOf(1000) , "Test", "N", "VA U SA", dateC reated); | |
| 60 | Prov iderInfo p roviderInf o = new Pr oviderInfo (Long.valu eOf(1000), claim, cl aimProcedu re, provid erType, | |
| 61 | "VA USA" , "VA USA" , "VA USA" , "Doe", " John", "jo hnny", "jr .", "Sarno Plaza", " Sarno Road ", "Melbou rne", | |
| 62 | "Florida", "32935", "John Doe" , "9999999 999", "912 345678", " john.doe@ DOMAIN ", Long.va lueOf(1000 ), dateCre ated, "VA USA"); | |
| 63 | Mock ito.when(i BillingPro viderRepos itoryMock. findOneByP rovider(cl aim.getCla imIndex(), | |
| 64 | ClaimDet ailsConsta nts.BILLIN G_PROVIDER _TYPE, Cla imDetailsC onstants.B ILLING_PRO VIDER_TYPE _OLD)).the nReturn(pr oviderInfo ); | |
| 65 | try { | |
| 66 | Provid erInfoResp onse resul tSet = bil lingProvid erServiceI mplMock | |
| 67 | .getBillin gProviderR esponse(cl aim); | |
| 68 | ||
| 69 | assert Equals(pro viderInfo. getAddress Line1(), r esultSet.g etAddressL ine1()); | |
| 70 | assert Equals(pro viderInfo. getAddress Line2(), r esultSet.g etAddressL ine2()); | |
| 71 | assert Equals(pro viderInfo. getCity(), resultSet .getCity() ); | |
| 72 | assert Equals(pro viderInfo. getProvide rNpi(), re sultSet.ge tProviderN pi()); | |
| 73 | assert Equals(pro viderInfo. getContact Name(), re sultSet.ge tContactNa me()); | |
| 74 | assert Equals(pro viderInfo. getState() , resultSe t.getState ()); | |
| 75 | assert Equals(pro viderInfo. getFaxNumb er(), resu ltSet.getF axNumber() ); | |
| 76 | assert Equals(pro viderInfo. getPhoneNu mber(), re sultSet.ge tPhoneNumb er()); | |
| 77 | ||
| 78 | logger .info("Tes t case pas sed with n o exceptio ns"); | |
| 79 | ||
| 80 | } ca tch (Excep tion e) { | |
| 81 | logger .info("Exc eption is: " + e); | |
| 82 | } | |
| 83 | } | |
| 84 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.