Produced by Araxis Merge on 10/18/2018 2:02:19 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 | VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\Java\ImagingCacheImpl\main\test\java\gov\va\med\imaging\storage\cache\impl\jcifs | TestCacheCreation.java | Thu Oct 11 13:30:18 2018 UTC |
2 | VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\Java\ImagingCacheImpl\main\test\java\gov\va\med\imaging\storage\cache\impl\jcifs | TestCacheCreation.java | Wed Oct 17 18:51:51 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 180 |
Changed | 2 | 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 | /** | |
2 | * | |
3 | */ | |
4 | package go v.va.med.i maging.sto rage.cache .impl.jcif s; | |
5 | ||
6 | import jav a.net.Inet Address; | |
7 | import jav a.net.URI; | |
8 | import jav a.net.URIS yntaxExcep tion; | |
9 | import jav a.util.Pro perties; | |
10 | ||
11 | import org .apache.lo gging.log4 j.LogManag er; | |
12 | ||
13 | import gov .va.med.im aging.stor age.cache. AbstractCa cheTest; | |
14 | import gov .va.med.im aging.stor age.cache. exceptions .CacheExce ption; | |
15 | import jun it.framewo rk.TestCas e; | |
16 | ||
17 | /** | |
18 | * @author PII | |
19 | * | |
20 | */ | |
21 | public cla ss TestCac heCreation | |
22 | extends Te stCase | |
23 | { | |
24 | pr ivate Stri ng localho stName; | |
25 | pr ivate Stri ng shareNa me = " AI "; | |
26 | pr ivate Stri ng shareUs er = " AI "; | |
27 | pr ivate Stri ng shareUs erPwd = " AI "; | |
28 | ||
29 | /* (non-Java doc) | |
30 | * @see juni t.framewor k.TestCase #setUp() | |
31 | * / | |
32 | @O verride | |
33 | pr otected vo id setUp() throws Ex ception | |
34 | { | |
35 | supe r.setUp(); | |
36 | ||
37 | Inet Address lo calhostAdd ress = Ine tAddress.g etLocalHos t(); | |
38 | loca lhostName = localhos tAddress.g etHostName (); | |
39 | ||
40 | Abst ractCacheT est.initia lizeLoggin g(this.get Name()); | |
41 | LogM anager.get Logger(thi s.getClass ()).info(" Starting u nit test ' " + this.g etName() + "' ====== ========== ========== ========== ========== =========" ); | |
42 | ||
43 | LogM anager.get Logger(thi s.getClass ()).info( | |
44 | "The dir ectory '" + shareNam e + | |
45 | "' must exist on t he local m achine, an d the user '" + shar eUser + | |
46 | "' must have full access. O therwise this test will fail. "); | |
47 | ||
48 | //lo calhostNam e = "ISW-B eckeC1-lt. "; | |
49 | } | |
50 | ||
51 | /* * | |
52 | * @return t he localho stName | |
53 | * / | |
54 | pu blic Strin g getLocal hostName() | |
55 | { | |
56 | retu rn this.lo calhostNam e; | |
57 | } | |
58 | ||
59 | pu blic void testConstr uctor() | |
60 | th rows URISy ntaxExcept ion, Cache Exception | |
61 | { | |
62 | Prop erties pro perties = new Proper ties(); | |
63 | prop erties.set Property(" jcifs.util .loglevel" , "4"); | |
64 | prop erties.set Property(" jcifs.reso lveOrder", "DNS"); | |
65 | prop erties.set Property(" jcifs.netb ios.lmhost s", "/VixC onfig/jcif shosts.txt "); | |
66 | ||
67 | jcif s.Config.g etInt(prop erties, "j cifs.util. loglevel") ; | |
68 | jcif s.Config.g etInt(prop erties, "j cifs.resol veOrder"); | |
69 | jcif s.Config.g etInt(prop erties, "j cifs.netbi os.lmhosts "); | |
70 | ||
71 | /*jc ifs.Config .setProper ty( "jcifs .util.logl evel", "4" ); | |
72 | jcif s.Config.s etProperty ( "jcifs.r esolveOrde r", "DNS" ); | |
73 | jcif s.Config.s etProperty ( "jcifs.n etbios.lmh osts", "/V ixConfig/j cifshosts. txt"); | |
74 | */ | |
75 | Stri ng cacheNa me = "Rand omName" + System.cur rentTimeMi llis(); | |
76 | URI cacheLocat ion = new URI("smb:/ /" + share User + ":" + shareUs erPwd + "@ " + getLoc alhostName () + share Name); | |
77 | ||
78 | Syst em.out.pri ntln("Crea ting cache '" + cach eName + "' at [" + c acheLocati on + "].") ; | |
79 | ||
80 | Jcif sCache cac he = Jcifs Cache.crea te(cacheNa me, cacheL ocation); | |
81 | asse rtNotNull( cache); | |
82 | ||
83 | cach e.addRegio n(JcifsReg ion.create (cache, "r egion1", n ull, 60, f alse)); | |
84 | ||
85 | cach e.setIniti alized(tru e); | |
86 | asse rtTrue(cac he.isIniti alized()); | |
87 | ||
88 | cach e.setEnabl ed(true); | |
89 | asse rtTrue(cac he.isEnabl ed()); | |
90 | ||
91 | } | |
92 | ||
93 | ||
94 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.