Produced by Araxis Merge on 4/2/2019 9:49:01 PM Eastern Daylight 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 | JLV_JLV 2_7_2_0_0.zip\JLV_Src\jMeadows\src\test\integration\java\gov\va\med\jmeadows\dao\provider | ProviderConsultsDaoTest.java | Wed Mar 20 21:45:36 2019 UTC |
2 | JLV_JLV 2_7_2_0_0.zip\JLV_Src\jMeadows\src\test\integration\java\gov\va\med\jmeadows\dao\provider | ProviderConsultsDaoTest.java | Tue Apr 2 13:30:31 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 244 |
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 | * Janus 4 .0 (c) | |
3 | * Copyrig ht (c) 201 1 Hawaii R esource Gr oup LLC. A ll Rights Reserved. | |
4 | * Develop ed for the Pacific T elehealth & Technolo gy Hui and the Pacif ic Joint I nformation Technolog y Center | |
5 | * Contrib utors: | |
6 | * Hon orable Sen ator Danie l K. Inouy e | |
7 | * VA Pacific Is lands Heal th Care Sy stem | |
8 | * Tri pler Army Medical Ce nter | |
9 | */ | |
10 | ||
11 | ||
12 | package go v.va.med.j meadows.da o.provider ; | |
13 | ||
14 | import gov .va.med.jm eadows.com mon.JMeado wsExceptio n; | |
15 | import gov .va.med.jm eadows.dao .beans.JMe adowsQuery ; | |
16 | import gov .va.med.jm eadows.dao .patient.D aoBaseTest ; | |
17 | import gov .va.med.jm eadows.dao .provider. ProviderCo nsultsDao; | |
18 | import gov .va.med.vd s.webservi ce.Consult ; | |
19 | import org .junit.Tes t; | |
20 | ||
21 | import jav a.util.Lis t; | |
22 | ||
23 | import sta tic org.ju nit.Assert .*; | |
24 | ||
25 | /** | |
26 | * | |
27 | * @author DNS | |
28 | */ | |
29 | public cla ss Provide rConsultsD aoTest ext ends DaoBa seTest | |
30 | { | |
31 | privat e Provider ConsultsDa o consults Dao; | |
32 | ||
33 | public ProviderC onsultsDao Test() thr ows JMeado wsExceptio n | |
34 | { | |
35 | su per(); | |
36 | co nsultsDao = new Prov iderConsul tsDao(); | |
37 | } | |
38 | ||
39 | @Test | |
40 | public void test GetProvide rConsultsR equested() | |
41 | { | |
42 | tr y | |
43 | { | |
44 | startDat e.set(2011 , 2, 1); | |
45 | endDate. set(2011, 3, 1); | |
46 | ||
47 | JMeadows Query qb = setupQuer y(user, pa tient, sta rtDate, en dDate); | |
48 | ||
49 | mockProv iderBasedQ uery(qb.ge tUser(), " 1522", "25 8"); | |
50 | ||
51 | qb.setSt artDate(nu ll); // D efault to T-1 month | |
52 | qb.setEn dDate(null ); // D efault to T+1 month | |
53 | ||
54 | List<Con sult> cons ultsReques ted = cons ultsDao.ge tProviderC onsultsReq uested(qb) ; | |
55 | assertTr ue(consult sRequested .size() > 0); | |
56 | if(consu ltsRequest ed.size() == 1) | |
57 | { | |
58 | Stri ng consult Error = co nsultsRequ ested.get( 0).getServ ice(); | |
59 | asse rtFalse(ER ROR_MSG_CO NNECTION_U NAVAILABLE .equalsIgn oreCase(co nsultError )); | |
60 | } | |
61 | logger.d ebug("# of Consults Requested: " + consu ltsRequest ed.size()) ; | |
62 | logger.d ebug("---" ); | |
63 | for(Cons ult c : co nsultsRequ ested) | |
64 | { | |
65 | logg er.debug(" ConsultId: " + c.get Id()); | |
66 | logg er.debug(" PatientId: " + c.get PatientId( )); | |
67 | logg er.debug(" PatientNam e: " + c.g etPatientN ame()); | |
68 | logg er.debug(" ConsultSer vice: " + c.getServi ce()); | |
69 | logg er.debug(" ConsultTyp e: " + c.g etConsultT ype()); | |
70 | logg er.debug(" ConsultSta tus: " + c .getStatus ()); | |
71 | logg er.debug(" ---"); | |
72 | } | |
73 | testForP roviderBea nMeta(cons ultsReques ted); | |
74 | } | |
75 | ca tch (JMead owsExcepti on ex) | |
76 | { | |
77 | fail(ex. getMessage ()); | |
78 | } | |
79 | } | |
80 | ||
81 | @Test | |
82 | public void test GetProvide rConsultsR eceived() | |
83 | { | |
84 | tr y | |
85 | { | |
86 | startDat e.set(2011 , 2, 1); | |
87 | endDate. set(2011, 3, 1); | |
88 | ||
89 | JMeadows Query qb = setupQuer y(user, pa tient, sta rtDate, en dDate); | |
90 | ||
91 | mockProv iderBasedQ uery(qb.ge tUser(), " 1522", "25 8"); | |
92 | qb.setSt artDate(nu ll); // D efault to T-1 month | |
93 | qb.setEn dDate(null ); // D efault to T+1 month | |
94 | ||
95 | List<Con sult> cons ultsReceiv ed = consu ltsDao.get ProviderCo nsultsRece ived(qb); | |
96 | assertTr ue(consult sReceived. size() > 0 ); | |
97 | ||
98 | if(consu ltsReceive d.size() = = 1) | |
99 | { | |
100 | Stri ng consult Error = co nsultsRece ived.get(0 ).getServi ce(); | |
101 | asse rtFalse(ER ROR_MSG_CO NNECTION_U NAVAILABLE .equalsIgn oreCase(co nsultError )); | |
102 | } | |
103 | ||
104 | logger.d ebug("# of Consults Received: " + consul tsReceived .size()); | |
105 | logger.d ebug("---" ); | |
106 | for(Cons ult c : co nsultsRece ived) | |
107 | { | |
108 | logg er.debug(" ConsultId: " + c.get Id()); | |
109 | logg er.debug(" PatientId: " + c.get PatientId( )); | |
110 | logg er.debug(" PatientNam e: " + c.g etPatientN ame()); | |
111 | logg er.debug(" ConsultSer vice: " + c.getServi ce()); | |
112 | logg er.debug(" ConsultTyp e: " + c.g etConsultT ype()); | |
113 | logg er.debug(" ConsultSta tus: " + c .getStatus ()); | |
114 | logg er.debug(" ---"); | |
115 | } | |
116 | testForP roviderBea nMeta(cons ultsReceiv ed); | |
117 | } | |
118 | ca tch (JMead owsExcepti on ex) | |
119 | { | |
120 | fail(ex. getMessage ()); | |
121 | } | |
122 | } | |
123 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.