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