Produced by Araxis Merge on 7/10/2017 1:01:47 PM Central 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 | C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\VistaImagingDataSourceProvider\main\test\java\gov\va\med\imaging\vistaimagingdatasource | DurableQueueDAOTests.java | Thu Jun 29 17:22:04 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\VistaImagingDataSourceProvider\main\test\java\gov\va\med\imaging\vistaimagingdatasource | DurableQueueDAOTests.java | Thu Jul 6 15:06:14 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 5 | 206 |
| Changed | 4 | 8 |
| 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.i maging.vis taimagingd atasource; | |
| 2 | ||
| 3 | import org .junit.Ass ert; | |
| 4 | import org .junit.Tes t; | |
| 5 | ||
| 6 | import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception; | |
| 7 | import gov .va.med.im aging.exch ange.busin ess.Durabl eQueue; | |
| 8 | import gov .va.med.im aging.exch ange.busin ess.Durabl eQueueMess age; | |
| 9 | import gov .va.med.im aging.url. vista.Stri ngUtils; | |
| 10 | import gov .va.med.im aging.vist aimagingda tasource.d icom.stora ge.Durable QueueDAO; | |
| 11 | ||
| 12 | import jav a.util.Lis t; | |
| 13 | ||
| 14 | public cla ss Durable QueueDAOTe sts{ | |
| 15 | @T est | |
| 16 | pu blic void testTransl ateFindAll (){ | |
| 17 | Stri ngBuilder builder = new String Builder(); | |
| 18 | buil der.append ("0^^4\r\n "); | |
| 19 | buil der.append ("IEN^NAME ^QUEUE TYP E^ACTIVE^N UM RETRIES ^RETRY DEL AY IN SECO NDS^TRIGGE R DELAY IN SECONDS\r \n"); | |
| 20 | buil der.append ("3^ASYNC_ ICON_QUEUE ^I^1^3^120 0^1200\r\n "); | |
| 21 | buil der.append ("2^Async Storage Re quest Erro r Queue^E^ 1^5^1200^1 200\r\n"); | |
| 22 | buil der.append ("1^Async Storage Re quest Queu e^S^1^5^12 00^1200\r\ n"); | |
| 23 | buil der.append ("4^E-Mail Queue^M^1 ^5^1200^12 00"); | |
| 24 | Dura bleQueueDA O dao = ne w DurableQ ueueDAO(nu ll); | |
| 25 | List <DurableQu eue> queue s = dao.tr anslateFin dAll(build er.toStrin g()); | |
| 26 | Asse rt.assertT rue(queues .size() == 4); | |
| 27 | for (int i=0; i < queues .size(); i ++){ | |
| 28 | Assert .assertTru e(queues.g et(i).getI d() > 0); | |
| 29 | Assert .assertTru e(queues.g et(i).getN ame() != n ull); | |
| 30 | Assert .assertTru e(queues.g et(i).getN ame().leng th() > 0); | |
| 31 | Assert .assertTru e(queues.g et(i).getT ype() != n ull); | |
| 32 | Assert .assertTru e(queues.g et(i).getT ype().leng th() > 0); | |
| 33 | Assert .assertTru e(queues.g et(i).getI sActive()) ; | |
| 34 | Assert .assertTru e(queues.g et(i).getR etryDelayI nSeconds() == 1200); | |
| 35 | Assert .assertTru e(queues.g et(i).getT riggerDela yInSeconds () == 1200 ); | |
| 36 | } | |
| 37 | } | |
| 38 | ||
| 39 | /* | |
| 40 | @T est | |
| 41 | pu blic void testTransl ateDurable QueueMessa ge(){ | |
| 42 | Stri ngBuilder builder = new String Builder(); | |
| 43 | buil der.append ("0^^5\r\n "); | |
| 44 | buil der.append ("<QUEUEME SSAGE\r\n" ); | |
| 45 | buil der.append ("PK=\"5\" \r\n"); | |
| 46 | buil der.append ("QUEUE=\" 4\"\r\n"); | |
| 47 | buil der.append ("PRIORITY =\"50\"\r\ n"); | |
| 48 | buil der.append ("ENQUEUED DATETIME=\ "20120206. 133321\"\r \n"); | |
| 49 | buil der.append ("EARLIEST DELIVERYDA TETIME=\"\ "\r\n"); | |
| 50 | buil der.append ("EXPIRATI ONDATETIME =\"\"\r\n" ); | |
| 51 | buil der.append ("MESSAGEG ROUPID=\"v haiswimgvm s107\"\r\n "); | |
| 52 | builder.ap pend("MESS AGE=\"
|
|
| 53 | buil der.append ("</QUEUEM ESSAGE >") ; | |
| 54 | Dura bleQueueDA O dao = ne w DurableQ ueueDAO(nu ll); | |
| 55 | try { | |
| 56 | Durabl eQueueMess age messag e = dao.tr anslateDur ableQueueM essage(bui lder.toStr ing()); | |
| 57 | Assert .assertEqu als(5, mes sage.getId ()); | |
| 58 | Assert .assertEqu als(4, mes sage.getQu eueId()); | |
| 59 | Assert .assertEqu als(50, me ssage.getP riority()) ; | |
| 60 | //Asse rt.assertE quals(2012 0206.13332 1, message .getExpira tionDateTi me()); | |
| 61 | Assert .assertEqu als("", me ssage.getM inDelivery DateTime() ); | |
| 62 | Assert .assertEqu als("vhais wimgvms107 ", message .getMessag eGroupId() ); | |
| 63 | Assert.ass ertEquals( "
|
|
| 64 | } ca tch (Metho dException e) { | |
| 65 | e.prin tStackTrac e(); | |
| 66 | Assert .fail(); | |
| 67 | } | |
| 68 | } | |
| 69 | */ | |
| 70 | /* | |
| 71 | @T est | |
| 72 | pu blic void testTransl ateDurable QueueMessa ge() throw s Exceptio n{ | |
| 73 | Stri ngBuilder builder = new String Builder(); | |
| 74 | buil der.append ("0^^2\r\n "); | |
| 75 | buil der.append ("This is a test mes sage."); | |
| 76 | Dura bleQueueDA O dao = ne w DurableQ ueueDAO(nu ll); | |
| 77 | Dura bleQueueMe ssage qmes sage = dao .translate DurableQue ueMessage( builder.to String()); | |
| 78 | Asse rt.assertT rue(qmessa ge.getId() == 2); | |
| 79 | Asse rt.assertT rue(qmessa ge.getMess age().leng th() > 0); | |
| 80 | } | |
| 81 | */ | |
| 82 | ||
| 83 | ||
| 84 | @T est | |
| 85 | pu blic void testTransl ateDurable QueueMessa ge() throw s Exceptio n{ | |
| 86 | Stri ngBuilder builder = new String Builder(); | |
| 87 | buil der.append ("0^^1\r\n <QUEUEMESS AGE\r\nPK= \"1\"\r\nQ UEUE=\"4\" \r\nPRIORI TY=\"50\"\ r\nENQUEUE DDATETIME= \"20130329 .162616\"\ r\nEARLIES TDELIVERYD ATETIME=\" \"\r\nEXPI RATIONDATE TIME=\"\"\ r\nMESSAGE GROUPID=\" vhaiswimgv ms107\"\r\ n"); | |
| 88 | buil der.append ("MESSAGE= \"\r\n"); | |
| 89 | builder.ap pend("< gov.va.med .imaging.e xchange.bu siness.Que uedEmailMe ssage>| /| <recipi ents>|/ | <string >
|
|
| 90 | buil der.append ("ect.< /subjectLi ne>|/| <messa geBody> P116_SCU - &gt; | /|Modality Device: , , &#x d;|/|SOP C lass: 1.2. 840.10008. 5.1.4.1.1. 11.2&# xd;|/|Erro r:: Presen tationStat eRelations hipMacro/E _REFERENCE D_SERIES_S EQUENCE/E_ REFERENCED _IMAGE_SEQ UENCE/: E_ REFERE\r\n "); | |
| 91 | buil der.append ("NCED_SER IES_SEQUEN CE/Item[1] /E_REFEREN CED_IMAGE_ SEQUENCE: Incorrect number of sequence i tems - got 75 but ex pected 1-1 &#xd;| /||/|SOP I nstance UI D -&gt ; |/|1.3.6 .1.4.1.596 2.99.1.308 4.1360.136 4588977572 .1.1.1.0.1 |/||/|DICO M object n ot dumped \r\n"); | |
| 92 | buil der.append ("to local file.|/|N otice: The problem m ay need to be correc ted by the device ve ndor.</ messageBod y>|/| <urgent >false& lt;/urgent >|/| & lt;retryCo unt>0&l t;/retryCo unt>|/| <mess ageCount&g t;1</me ssageCount >|/| & lt;bodyByt eSize>0 </bodyB yteSize> ;|/| < dateTimeP\ r\n"); | |
| 93 | buil der.append ("osted> ;|/| &l t;time> 1364588986 440</ti me>|/| <tim ezone>A merica/New _York</ timezone&g t;|/| < ;/dateTime Posted> |/|</go v.va.med.i maging.exc hange.busi ness.Queue dEmailMess age>\" >\r\n"); | |
| 94 | buil der.append ("</QUEUEM ESSAGE >") ; | |
| 95 | Dura bleQueueDA O dao = ne w DurableQ ueueDAO(nu ll); | |
| 96 | Dura bleQueueMe ssage qmes sage = dao .translate DurableQue ueMessage( builder.to String()); | |
| 97 | ||
| 98 | Stri ng output = StringUt ils.displa yEncodedCh ars(qmessa ge.getMess age()); | |
| 99 | Syst em.out.pri ntln("Encr ypted Mess age: \n"+o utput); | |
| 100 | String res ult = "<go v.va.med.i maging.exc hange.busi ness.Queue dEmailMess age> <recipient s> <string>
|
|
| 101 | Asse rt.assertT rue(qmessa ge.getMess age().equa ls(result) ); | |
| 102 | //As sert.asser tTrue(qmes sage.getMe ssage().le ngth() > 0 ); | |
| 103 | } | |
| 104 | ||
| 105 | ||
| 106 | ||
| 107 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.