Produced by Araxis Merge on 11/9/2017 4:31:03 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 | PPS-N_B397.zip\PPS-N_B397\PPS-N_B397\PS_PPS_domain\src\test\java\gov\va\med\pharmacy\peps\domain\common\utility\client\rxnorm\test | RxNormClientIT.java | Thu Nov 9 14:59:38 2017 UTC |
2 | PPS-N_B397.zip\PPS-N_B397\PPS-N_B397\PS_PPS_domain\src\test\java\gov\va\med\pharmacy\peps\domain\common\utility\client\rxnorm\test | RxNormClientIT.java | Thu Nov 9 19:40:30 2017 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 206 |
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.med.p harmacy.pe ps.domain. common.uti lity.clien t.rxnorm.t est; | |
2 | ||
3 | import org .junit.Tes t; | |
4 | import org .junit.run ner.RunWit h; | |
5 | import org .junit.run ners.Param eterized; | |
6 | import org .junit.run ners.Param eterized.P arameters; | |
7 | import org .springfra mework.bea ns.BeansEx ception; | |
8 | import org .springfra mework.con text.Appli cationCont ext; | |
9 | import org .springfra mework.con text.Appli cationCont extAware; | |
10 | import org .springfra mework.tes t.context. TestContex tManager; | |
11 | ||
12 | import gov .va.med.ph armacy.pep s.common.u tility.Con figFileUti lity; | |
13 | import gov .va.med.ph armacy.pep s.common.u tility.imp l.test.Env ironmentUt ilityStub; | |
14 | import gov .va.med.ph armacy.pep s.domain.c ommon.util ity.client .rxnorm.Rx NormClient ; | |
15 | import gov .va.med.ph armacy.pep s.domain.c ommon.util ity.client .rxnorm.Rx NormData; | |
16 | import gov .va.med.ph armacy.pep s.domain.c ommon.util ity.test.A bstractDom ainIT; | |
17 | ||
18 | import jav a.util.Arr ays; | |
19 | import jav a.util.Lis t; | |
20 | ||
21 | import org .apache.lo gging.log4 j.LogManag er; | |
22 | import org .apache.lo gging.log4 j.Logger; | |
23 | import org .junit.Ass ert; | |
24 | import org .junit.Bef ore; | |
25 | ||
26 | /** | |
27 | * This cl ass basica lly tests the calls to the ISA AC service to get rx norm codes . | |
28 | * | |
29 | * @author
|
|
30 | * | |
31 | */ | |
32 | @RunWith(P arameteriz ed.class) | |
33 | public cla ss RxNormC lientIT ex tends Abst ractDomain IT impleme nts Applic ationConte xtAware { | |
34 | ||
35 | privat e static f inal Logge r LOG = Lo gManager.g etLogger(R xNormClien tIT.class) ; | |
36 | ||
37 | privat e Applicat ionContext context; | |
38 | privat e RxNormCl ient rxnor mClient; | |
39 | privat e final St ring vuid; | |
40 | privat e TestCont extManager testConte xtManager; | |
41 | ||
42 | privat e static f inal List< String> VU IDS = Arra ys.asList( | |
43 | "4 001164", " 4005733", "4002412", "4003547" , "4007158 ", "400718 3", "40019 54"); | |
44 | ||
45 | /** | |
46 | *Run each test for each V UID. | |
47 | * | |
48 | * @re turn list of VUID pa rameters | |
49 | */ | |
50 | @Param eters | |
51 | public static Li st<String> data() { | |
52 | re turn VUIDS ; | |
53 | } | |
54 | ||
55 | /** | |
56 | *Cons tructs ins tance with test para meters. | |
57 | * | |
58 | * @pa ram pVuid | |
59 | */ | |
60 | public RxNormCli entIT(fina l String p Vuid) { | |
61 | vu id = pVuid ; | |
62 | } | |
63 | ||
64 | /** | |
65 | * Pre pares the class for testing. | |
66 | */ | |
67 | @Befor e | |
68 | public void setu p() throws Exception { | |
69 | te stContextM anager = n ew TestCon textManage r(getClass ()); | |
70 | te stContextM anager.pre pareTestIn stance(thi s); | |
71 | ||
72 | rx normClient = (RxNorm Client) co ntext.getB ean("rxNor mClient"); | |
73 | En vironmentU tilityStub environme ntUtility = new Envi ronmentUti lityStub() ; | |
74 | en vironmentU tility.set National() ; | |
75 | } | |
76 | ||
77 | /** | |
78 | * Tes t the call s to the I SAAC servi ce to get some codes . | |
79 | */ | |
80 | @Test | |
81 | public void test GetRxNormC odeFromIsa ac() { | |
82 | ||
83 | St ring code = rxnormCl ient.getCo de(vuid, n ew ConfigF ileUtility ()); | |
84 | LO G.info(cod e); | |
85 | As sert.asser tNotNull(" should rec eive code back", cod e); | |
86 | } | |
87 | ||
88 | /** | |
89 | * Tes t the call s to the I SAAC servi ce to get RX Norm Da ta. | |
90 | */ | |
91 | @Test | |
92 | public void test GetRxNormD ataFromIsa ac() { | |
93 | Rx NormData d ata = rxno rmClient.g etRxNormDa ta(vuid, n ew ConfigF ileUtility ()); | |
94 | LO G.info(dat a); | |
95 | As sert.asser tNotNull(" should rec eive RxNor mData back ", data); | |
96 | } | |
97 | ||
98 | @Overr ide | |
99 | public void setA pplication Context(Ap plicationC ontext app licationCo ntext) thr ows BeansE xception { | |
100 | th is.context = applica tionContex t; | |
101 | ||
102 | } | |
103 | ||
104 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.