Produced by Araxis Merge on 5/23/2019 1:19:13 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 | PATS_R_SourceCode.zip\PATSRIntegrationsCRMOL\UnitTests | WHHUnitTests.cs | Mon Apr 29 14:00:14 2019 UTC |
2 | PATS_R_SourceCode.zip\PATSRIntegrationsCRMOL\UnitTests | WHHUnitTests.cs | Thu May 23 01:30:07 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 376 |
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 | using Syst em; | |
2 | using Micr osoft.Visu alStudio.T estTools.U nitTesting ; | |
3 | using WHH. VEFT.Messa ges; | |
4 | using VRM. Integratio n.Serviceb us.Core; | |
5 | using VRM. Integratio n.Serviceb us.Extensi ons; | |
6 | using VEIS .Utilities ; | |
7 | using VEIS .Utilities .Models; | |
8 | ||
9 | namespace PATSRUnitT ests | |
10 | { | |
11 | [TestC lass] | |
12 | public class Uni tTest2 | |
13 | { | |
14 | pr ivate stat ic string _orgName; | |
15 | ||
16 | pr ivate stat ic Guid _c rmeUserId = Guid.Par se("6FF0CA 08-2FD2-E4 11-B6F7-00 155D5575E0 "); | |
17 | ||
18 | private st atic strin g veisUrl = "https:/ / DNS . URL /"; | |
19 | ||
20 | pr ivate stat ic string clientId = "58d50ca3 -b921-4d9b -ac76-8965 be2eb80b"; | |
21 | ||
22 | pr ivate stat ic string clientSecr et = "4RdV Ddhq8cv/h2 263Ojdy8fD 3JI9OwHcr5 hOkntAwTc= "; | |
23 | ||
24 | pr ivate stat ic string tenantId = "f7c49e36 -971b-42c7 -b244-a88e ed6c0bf6"; | |
25 | ||
26 | pr ivate stat ic string veisOrgNam e = "CRMED EV"; | |
27 | ||
28 | pr ivate stat ic string resourceId = "4a7747 6c-ceed-45 db-ad7e-ac 2bbbc4f72a "; | |
29 | ||
30 | pr ivate stat ic string subscripti onKey = "8 8784cf9396 e41dab087c 90a5da0c2c 1"; | |
31 | ||
32 | pr ivate stat ic string medalliaPa th = "pats r.lob.meda llia/api"; | |
33 | ||
34 | pr ivate stat ic string irisPath = "patsr.lo b.iris/api "; | |
35 | ||
36 | pr ivate stat ic string whhPath = "patsr.lob .whh/api"; | |
37 | ||
38 | #r egion Init ialize | |
39 | [T estInitial ize] | |
40 | pu blic void testInit() | |
41 | { | |
42 | ||
43 | } | |
44 | #e ndregion I nitialize | |
45 | ||
46 | ||
47 | [T estMethod] | |
48 | pu blic void testWHHCre ate() //VR MRest.WebA pi.WebApiU tility.Sen dReceive<C reateInter actionResp onse>(_onP remDACUri, "CreateIn teractionR equest", r equest, nu ll, _OnPre mDACwsd); | |
49 | { | |
50 | var rand om = new R andom(); | |
51 | ||
52 | ||
53 | WHHCreat eInteracti onRequest wHHCreateI nteraction Request = new WHHCre ateInterac tionReques t | |
54 | { | |
55 | Orga nizationNa me = "FTP" , | |
56 | //Me ssageLoggi ng = loggi ng, | |
57 | Case Id = Guid. NewGuid(). ToString() , | |
58 | Case Number = r andom.Next (1000000, 9999999), | |
59 | Crea tedDate = DateTime.N ow.Date.Ad dDays(-3). ToString() , | |
60 | VIEW S_Facility __c = "629 ", | |
61 | SENS ITIVE_WHVA Hotline_Su bject__c = "This is the subjec t", | |
62 | WHVA Hotline_Co mments__c = "These a re the com ments", | |
63 | OCR_ Notes = "T his is the OCR Notes ", | |
64 | WHVA Hotline_SL A_Start_Da te_Tim = D ateTime.No w.Date.Add Days(-3).T oString(), | |
65 | WHVA Hotline_SL A_Business _Days__c = 6, | |
66 | VIEW S_SLA_End_ Date_DateT ime__c = D ateTime.No w.Date.Add Days(3).To String(), | |
67 | Days _Until_SLA _Overdue__ c = 3, | |
68 | VIEW S_Tier_1_C omplaint_C ategory__c = "The co mplaint ca tegory", | |
69 | VIEW S_Complain t_Category _Descripti on__c = "T he complai nt categor y descript ion", | |
70 | Shor t_Descript ion__c = " Other comp laint type ", | |
71 | Owne r = "The o wner", | |
72 | Last ModifiedBy = "Last M odified By ", | |
73 | Stat us = "Stat us", | |
74 | WHVA Hotline_Pr iority_One _High__c = "Priority One Strin g", | |
75 | Prio rityOne_In dicator = true, | |
76 | WH_V A_Hotline_ Reason_Pri ority__c = "", | |
77 | Seco ndary_Phon e__c = "(1 23) 234-34 56", | |
78 | WHHo tline_Othe r_Location __c = "Som e other fa cility", | |
79 | View s_Administ ration__c = "Board", | |
80 | Seco ndary_Emai l__c = "te st@test.co m", | |
81 | Reco rdType = " non-compla int", | |
82 | VIEW S_Other_Re lationship _Informtat ion__c = " Someone ot her than t he veteran ?", | |
83 | VIEW S_Relation ship_to_Ve teran_ = " Other", | |
84 | Anon ymous__c = false, | |
85 | Firs tName = "J ohn", | |
86 | Last Name = "Do e", | |
87 | Emai l = "test@ test.test" , | |
88 | Phon e = "123-1 23-1234", | |
89 | Birt hdate = "0 1/15/1977" , | |
90 | Firs tName_Prox y = "Jane" , | |
91 | Last Name_Proxy = "Doe", | |
92 | Phon e_Proxy = "321-321-3 214", | |
93 | Emai l_Proxy = "thing@stu ff.net", | |
94 | Seco ndaryPhone _Proxy = " 345-345-34 56", | |
95 | Pref erredEmail _Proxy = " stuff@thin g.net", | |
96 | Inte rnal_OCR_D ueDate = " 06/06/2018 ", | |
97 | VISN = "", | |
98 | ICN = "1012901 147V954482 " | |
99 | }; | |
100 | try | |
101 | { | |
102 | Veis Config con fig = Retr ieveVeisCo nfig(whhPa th); | |
103 | WHHC reateInter actionResp onse wHHCr eateIntera ctionRespo nse = WebA piUtility. SendReceiv eVeisReque st<WHHCrea teInteract ionRespons e>(config, "Interact ion", wHHC reateInter actionRequ est); | |
104 | ||
105 | var test = wHH CreateInte ractionRes ponse.Exce ptionMessa ge; | |
106 | ||
107 | } | |
108 | catch (E xception e x) | |
109 | { | |
110 | Cons ole.WriteL ine(ex.Mes sage); | |
111 | Cons ole.WriteL ine(ex.Sta ckTrace); | |
112 | Asse rt.Fail(ex .Message); | |
113 | } | |
114 | } | |
115 | ||
116 | [T estMethod] | |
117 | pu blic void testWHHUpd ate() //VR MRest.WebA pi.WebApiU tility.Sen dReceive<C reateInter actionResp onse>(_onP remDACUri, "CreateIn teractionR equest", r equest, nu ll, _OnPre mDACwsd); | |
118 | { | |
119 | var rand om = new R andom(); | |
120 | ||
121 | var logg ing = new MessageLog ging() | |
122 | { | |
123 | Igno reState = false, | |
124 | MaxR etry = -1, | |
125 | Mess ageName = "CreateInt eractionRe quest", | |
126 | Mess ageType = "LOB", | |
127 | Orga nizationNa me = "FTP" | |
128 | }; | |
129 | ||
130 | var requ est = new WHHUpdateS tatusReque st | |
131 | { | |
132 | Orga nizationNa me = "FTP" , | |
133 | Mess ageLogging = logging , | |
134 | Case Id = "C-62 9.20181234 5", | |
135 | Disp ositionNot es = "Some Notes", | |
136 | Mess ageId = Gu id.NewGuid ().ToStrin g(), | |
137 | Modi fiedBy = " Me", | |
138 | Modi fiedOn = " 2018-05-22 T13:42:00. 000Z", | |
139 | Surv eyID = "50 0r0000003X Zn6AAG", | |
140 | Stat us = "Reso lved" | |
141 | }; | |
142 | try | |
143 | { | |
144 | Veis Config con fig = Retr ieveVeisCo nfig(whhPa th); | |
145 | WHHU pdateStatu sResponse response = WebApiUti lity.SendR eceiveVeis Request<WH HUpdateSta tusRespons e>(config, "Status", request); | |
146 | var test = "te st"; | |
147 | //va r test = r esponse.Ex ceptionMes sage; | |
148 | //va r res = re quest.Send Receive<WH HUpdateSta tusRespons e>(Message ProcessTyp e.Local); | |
149 | ||
150 | } | |
151 | catch (E xception e x) | |
152 | { | |
153 | Cons ole.WriteL ine(ex.Mes sage); | |
154 | Cons ole.WriteL ine(ex.Sta ckTrace); | |
155 | Asse rt.Fail(ex .Message); | |
156 | } | |
157 | } | |
158 | ||
159 | in ternal sta tic VeisCo nfig Retri eveVeisCon fig(string path) | |
160 | { | |
161 | VeisConf ig config = new Veis Config() | |
162 | { | |
163 | OrgO verride = veisOrgNam e, | |
164 | }; | |
165 | ||
166 | config.O rgName = v eisOrgName ; | |
167 | ||
168 | config.V eisConfigu ration = n ew VeisCon figuration () | |
169 | { | |
170 | CRMA uthInfo = new CRMAut hTokenConf iguration( ) | |
171 | { | |
172 | ClientAppl icationId = clientId , | |
173 | ClientSecr et = clien tSecret, | |
174 | TenantId = tenantId, | |
175 | ResourceId = resourc eId, | |
176 | ||
177 | }, | |
178 | SvcC onfigInfo = new VEIS SvcLOBConf iguration( ) | |
179 | { | |
180 | ApimSubscr iptionKey = subscrip tionKey, | |
181 | } | |
182 | }; | |
183 | ||
184 | config.V eisConfigu ration.Svc ConfigInfo .SvcLOBSer viceUrl = veisUrl + path; | |
185 | return c onfig; | |
186 | } | |
187 | ||
188 | } | |
189 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.