Produced by Araxis Merge on 12/5/2017 12:06:48 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 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\SiteServiceDataSourceProvider\main\functest\java\gov\va\med\siteservice | TestSiteServiceProvider.java | Mon Dec 4 21:34:18 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\SiteServiceDataSourceProvider\main\functest\java\gov\va\med\siteservice | TestSiteServiceProvider.java | Mon Dec 4 22:05:36 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 308 |
| 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.s iteservice ; | |
| 2 | ||
| 3 | import gov .va.med.Pr otocolHand lerUtility ; | |
| 4 | import gov .va.med.Ro utingToken ; | |
| 5 | import gov .va.med.Ro utingToken Impl; | |
| 6 | import gov .va.med.ex ceptions.R outingToke nFormatExc eption; | |
| 7 | import gov .va.med.im aging.arti factsource .ArtifactS ource; | |
| 8 | import gov .va.med.im aging.arti factsource .ResolvedA rtifactSou rce; | |
| 9 | import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on; | |
| 10 | import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception; | |
| 11 | import gov .va.med.im aging.data source.Dat aSourcePro vider; | |
| 12 | import gov .va.med.im aging.data source.Pro vider; | |
| 13 | import gov .va.med.im aging.data source.Sit eResolutio nDataSourc eSpi; | |
| 14 | import gov .va.med.im aging.exch ange.busin ess.Resolv edSite; | |
| 15 | ||
| 16 | import jav a.net.Malf ormedURLEx ception; | |
| 17 | import jav a.net.URL; | |
| 18 | import jav a.util.Lis t; | |
| 19 | ||
| 20 | //import o rg. apache .log4j.App ender; | |
| 21 | //import o rg. apache .log4j.Con soleAppend er; | |
| 22 | //import o rg. apache .log4j.Lay out; | |
| 23 | //import o rg.apache. logging.lo g4j.LogMan ager; | |
| 24 | //import o rg.apache. logging.lo g4j.Logger ; | |
| 25 | //import o rg. apache .log4j.Sim pleLayout; | |
| 26 | //import o rg. apache .log4j.Wri terAppende r; | |
| 27 | ||
| 28 | import jun it.framewo rk.TestCas e; | |
| 29 | ||
| 30 | /** | |
| 31 | * | |
| 32 | * @author
|
|
| 33 | * | |
| 34 | */ | |
| 35 | public cla ss TestSit eServicePr ovider | |
| 36 | extends Te stCase | |
| 37 | { | |
| 38 | pr ivate Data SourceProv ider provi der; | |
| 39 | ||
| 40 | pu blic URL g etUrl() | |
| 41 | th rows Malfo rmedURLExc eption | |
| 42 | { | |
| 43 | retu rn new URL ("http://l ocalhost/V istaWebSvc s/ImagingE xchangeSit eService.a smx"); | |
| 44 | } | |
| 45 | ||
| 46 | pr ivate Site Resolution DataSource Spi siteRe solutionDa taSource; | |
| 47 | ||
| 48 | /* * | |
| 49 | * @see juni t.framewor k.TestCase #setUp() | |
| 50 | * / | |
| 51 | @O verride | |
| 52 | pr otected vo id setUp() | |
| 53 | th rows Excep tion | |
| 54 | { | |
| 55 | supe r.setUp(); | |
| 56 | // Layo ut layout = new Simp leLayout() ; | |
| 57 | // Appe nder appen der = new WriterAppe nder(layou t, System. out); | |
| 58 | // Logg er.getRoot Logger().a ddAppender (appender) ; | |
| 59 | Prot ocolHandle rUtility.i nitialize( true); | |
| 60 | ||
| 61 | prov ider = new Provider( ); | |
| 62 | ||
| 63 | site Resolution DataSource = provide r.createSi teResoluti onDataSour ce(); | |
| 64 | } | |
| 65 | ||
| 66 | pr otected Si teResoluti onDataSour ceSpi getS iteResolut ionDataSou rce() | |
| 67 | { | |
| 68 | retu rn siteRes olutionDat aSource; | |
| 69 | } | |
| 70 | ||
| 71 | /* * | |
| 72 | * Test meth od for {@l ink gov.va .med.imagi ng.datasou rce.SiteRe solutionDa taSourceSp i#resolveS ite(java.l ang.String )}. | |
| 73 | * / | |
| 74 | pu blic void testResolv eSite() | |
| 75 | { | |
| 76 | Reso lvedSite r esolvedSit e = resolv eSite("200 ", true, f alse); | |
| 77 | asse rtNotNull( resolvedS ite.getArt ifactUrl(" exchange") ); | |
| 78 | asse rtNotNull( resolvedS ite.getArt ifactUrl(" xca") ); | |
| 79 | ||
| 80 | reso lvedSite = resolveSi te("660", true, true ); | |
| 81 | asse rtNotNull( resolvedS ite.getArt ifactUrl(" vistaimagi ng") ); | |
| 82 | } | |
| 83 | ||
| 84 | /* * | |
| 85 | * @pa ram resolv edSite | |
| 86 | */ | |
| 87 | privat e Resolved Site resol veSite(Str ing siteNu mber, bool ean expect ed, boolea n requireA ccelerator ) | |
| 88 | { | |
| 89 | Reso lvedSite r esolvedSit e = null; | |
| 90 | ||
| 91 | try | |
| 92 | { | |
| 93 | resolv edSite = g etSiteReso lutionData Source().r esolveSite (siteNumbe r); | |
| 94 | ||
| 95 | if(exp ected) | |
| 96 | { | |
| 97 | assertNo tNull(reso lvedSite); | |
| 98 | assertNo tNull(reso lvedSite.g etSite()); | |
| 99 | ||
| 100 | if(requi reAccelera tor) | |
| 101 | assertNotN ull(resolv edSite.get Site().get Accelerato rServer()) ; | |
| 102 | } | |
| 103 | else | |
| 104 | assertNu ll(resolve dSite); | |
| 105 | } | |
| 106 | ca tch (Unsup portedOper ationExcep tion e) | |
| 107 | { | |
| 108 | e.pr intStackTr ace(); | |
| 109 | fail (e.getMess age()); | |
| 110 | } | |
| 111 | ca tch (Metho dException e) | |
| 112 | { | |
| 113 | e.pr intStackTr ace(); | |
| 114 | fail (e.getMess age()); | |
| 115 | } | |
| 116 | ca tch (Conne ctionExcep tion e) | |
| 117 | { | |
| 118 | e.pr intStackTr ace(); | |
| 119 | fail (e.getMess age()); | |
| 120 | } | |
| 121 | ||
| 122 | re turn resol vedSite; | |
| 123 | } | |
| 124 | ||
| 125 | /** | |
| 126 | * | |
| 127 | * @th rows Metho dException | |
| 128 | * @th rows Conne ctionExcep tion | |
| 129 | * @th rows Routi ngTokenFor matExcepti on | |
| 130 | */ | |
| 131 | public void test ArtifactSo urces() | |
| 132 | throws MethodExc eption, Co nnectionEx ception, R outingToke nFormatExc eption | |
| 133 | { | |
| 134 | Li st<Artifac tSource> a rtifactSou rces = get SiteResolu tionDataSo urce().get AllArtifac tSources() ; | |
| 135 | as sertNotNul l(artifact Sources); | |
| 136 | ||
| 137 | Li st<Resolve dArtifactS ource> res olvedArtif actSources = getSite Resolution DataSource ().getAllR esolvedArt ifactSourc es(); | |
| 138 | as sertNotNul l(resolved ArtifactSo urces); | |
| 139 | ||
| 140 | Ro utingToken routingTo ken = Rout ingTokenIm pl.createV ARadiology Site("660" ); | |
| 141 | Re solvedArti factSource ras = get SiteResolu tionDataSo urce().res olveArtifa ctSource(r outingToke n); | |
| 142 | as sertNotNul l(ras); | |
| 143 | as sertNotNul l( ras.get ArtifactUr l("vistaim aging") ); | |
| 144 | ||
| 145 | ro utingToken = Routing TokenImpl. createVARa diologySit e("200"); | |
| 146 | ra s = getSit eResolutio nDataSourc e().resolv eArtifactS ource(rout ingToken); | |
| 147 | as sertNotNul l(ras); | |
| 148 | as sertNotNul l( ras.get ArtifactUr l("exchang e") ); | |
| 149 | ||
| 150 | ro utingToken = Routing TokenImpl. createDoDD ocumentSit e("200"); | |
| 151 | ra s = getSit eResolutio nDataSourc e().resolv eArtifactS ource(rout ingToken); | |
| 152 | as sertNotNul l(ras); | |
| 153 | as sertNotNul l( ras.get ArtifactUr l("xca") ) ; | |
| 154 | } | |
| 155 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.