Produced by Araxis Merge on 2/4/2019 11:34:05 AM Eastern 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 | MHPRO_v1.x.zip\mhpro-resources-master@a26412b610c.zip\ws\src\test\java\gov\va\mobile\vamf\mhpro\rpc\dao\impl | RpcGetScalesDAOTest.java | Tue Nov 14 19:31:17 2017 UTC |
| 2 | MHPRO_v1.x.zip\mhpro-resources-master@a26412b610c.zip\ws\src\test\java\gov\va\mobile\vamf\mhpro\rpc\dao\impl | RpcGetScalesDAOTest.java | Fri Feb 1 19:27:43 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 240 |
| 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 | package go v.va.mobil e.vamf.mhp ro.rpc.dao .impl; | |
| 2 | ||
| 3 | import jav a.util.Lis t; | |
| 4 | ||
| 5 | import jav ax.resourc e.cci.Conn ectionSpec ; | |
| 6 | ||
| 7 | import org .junit.Aft er; | |
| 8 | import org .junit.Bef ore; | |
| 9 | import org .junit.Tes t; | |
| 10 | import org .junit.run ner.RunWit h; | |
| 11 | import org .mockito.M ock; | |
| 12 | import org .mockito.r unners.Moc kitoJUnitR unner; | |
| 13 | import org .springfra mework.tes t.util.Ref lectionTes tUtils; | |
| 14 | import sta tic org.mo ckito.Mock ito.when; | |
| 15 | import sta tic org.ju nit.Assert .assertNot Null; | |
| 16 | import sta tic org.mo ckito.Matc hers.any; | |
| 17 | ||
| 18 | import gov .va.med.ci ss.service .VistaCust omization; | |
| 19 | import gov .va.med.ci ss.service .log.Logge rListener; | |
| 20 | import gov .va.med.ci ss.service .vista.RPC Exception; | |
| 21 | import gov .va.med.ci ss.service .vista.Rpc ServiceUti l; | |
| 22 | import gov .va.med.ci ss.service .vista.Rpc ServiceUti lFactory; | |
| 23 | import gov .va.med.ci ss.service .vistalink .KaajeeSer vice; | |
| 24 | import gov .va.med.ci ss.service .vistalink .VistaLink Service; | |
| 25 | import gov .va.mobile .vamf.mhpr o.rpc.Scal eGroup; | |
| 26 | import gov .va.mobile .vamf.mhpr o.service. IVistaLink AuditServi ce; | |
| 27 | ||
| 28 | /** | |
| 29 | * @author PII | |
| 30 | * | |
| 31 | * Unit te st RpcGetS calesDAO c lass. | |
| 32 | */ | |
| 33 | @RunWith(M ockitoJUni tRunner.cl ass) | |
| 34 | public cla ss RpcGetS calesDAOTe st { | |
| 35 | ||
| 36 | pr ivate RpcG etScalesDA O rpcGetSc alesDAO; | |
| 37 | ||
| 38 | /* * The rpc service ut il factory . */ | |
| 39 | @M ock | |
| 40 | pr ivate RpcS erviceUtil Factory rp cServiceUt ilFactory; | |
| 41 | @M ock | |
| 42 | privat e IVistaLi nkAuditSer vice vista LinkAuditS ervice; | |
| 43 | ||
| 44 | @B efore | |
| 45 | pu blic void setUp() th rows Excep tion { | |
| 46 | rpcG etScalesDA O = new Rp cGetScales DAO(); | |
| 47 | Refl ectionTest Utils.setF ield(rpcGe tScalesDAO , "rpcServ iceUtilFac tory", rpc ServiceUti lFactory); | |
| 48 | Refl ectionTest Utils.setF ield(rpcGe tScalesDAO , "vistaLi nkAuditSer vice", vis taLinkAudi tService); | |
| 49 | } | |
| 50 | ||
| 51 | @A fter | |
| 52 | pu blic void tearDown() throws Ex ception { | |
| 53 | } | |
| 54 | ||
| 55 | @T est | |
| 56 | pu blic void testRpcGet ScalesDAO( ) throws E xception { | |
| 57 | Mock RpcService Util mockU til = new MockRpcSer viceUtil(n ull,null,n ull); | |
| 58 | when (rpcServic eUtilFacto ry.getInst ance(any(O bject.clas s))).thenR eturn(mock Util); | |
| 59 | ||
| 60 | Stri ng divisio n = "442"; | |
| 61 | Stri ng instrum ent = "GAD -7"; | |
| 62 | Stri ng duz = " 74"; | |
| 63 | List <ScaleGrou p> scaleGr oups = rpc GetScalesD AO.retriev eScaleGrou ps(divisio n, instrum ent, duz); | |
| 64 | asse rtNotNull( scaleGroup s); | |
| 65 | } | |
| 66 | ||
| 67 | /* * | |
| 68 | * The Class MockRpcSe rviceUtil. | |
| 69 | * / | |
| 70 | cl ass MockRp cServiceUt il extends RpcServic eUtil { | |
| 71 | ||
| 72 | /** The Consta nt data. * / | |
| 73 | priv ate final static Str ing data = "[DATA]\n 317=6501^N UMBER^Equa ls^0^AND^\ n^^\n^\n31 8=6503^NUM BER^Equals ^0^AND^\n^ ^\n^\n"; | |
| 74 | ||
| 75 | /* | |
| 76 | * ( non-Javado c) | |
| 77 | * | |
| 78 | * @ see | |
| 79 | * g ov.va.med. ciss.servi ce.vista.R pcServiceU til#runRpc (java.lang .String, | |
| 80 | * j ava.lang.S tring, jav a.util.Lis t, | |
| 81 | * g ov.va.med. ciss.servi ce.VistaCu stomizatio n[]) | |
| 82 | */ | |
| 83 | @Ove rride | |
| 84 | publ ic String runRpc(Str ing arg0, String arg 1, List<Ob ject> arg2 , VistaCus tomization ... arg3) | |
| 85 | throws R PCExceptio n { | |
| 86 | // TOD O Auto-gen erated met hod stub | |
| 87 | String result = data; | |
| 88 | return result; | |
| 89 | } | |
| 90 | ||
| 91 | /* | |
| 92 | * ( non-Javado c) | |
| 93 | * | |
| 94 | * @ see | |
| 95 | * g ov.va.med. ciss.servi ce.vista.R pcServiceU til#setLog gerCallbac k(gov.va | |
| 96 | * . med.ciss.s ervice.log .LoggerLis tener) | |
| 97 | */ | |
| 98 | @Ove rride | |
| 99 | publ ic void se tLoggerCal lback(Logg erListener loggerCal lback) { | |
| 100 | // TOD O Auto-gen erated met hod stub | |
| 101 | super. setLoggerC allback(lo ggerCallba ck); | |
| 102 | } | |
| 103 | ||
| 104 | /** | |
| 105 | * I nstantiate s a new mo ck rpc ser vice util. | |
| 106 | * | |
| 107 | * @ param conn Spec | |
| 108 | * the conn s pec | |
| 109 | * @ param kaaj eeService | |
| 110 | * the kaajee service | |
| 111 | * @ param vist aLinkServi ce | |
| 112 | * the vista link servi ce | |
| 113 | */ | |
| 114 | publ ic MockRpc ServiceUti l(Connecti onSpec con nSpec, Kaa jeeService kaajeeSer vice, | |
| 115 | VistaLin kService v istaLinkSe rvice) { | |
| 116 | super( connSpec, kaajeeServ ice, vista LinkServic e); | |
| 117 | // TOD O Auto-gen erated con structor s tub | |
| 118 | } | |
| 119 | } | |
| 120 | ||
| 121 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.