@@ -35,7 +35,7 @@ class CachedFileTest {
35
35
static Path cacheDir ;
36
36
static CacheStore cacheStore ;
37
37
static final List <String > fileContents = Arrays .asList ("A" , "B" , "C" );
38
- static final String ver12213 = "12.2.1.3.0" ;
38
+ static final String VER_12213 = "12.2.1.3.0" ;
39
39
40
40
@ BeforeAll
41
41
static void setup (@ TempDir Path tempDir , @ TempDir Path cacheDir ) throws IOException {
@@ -49,7 +49,7 @@ static void setup(@TempDir Path tempDir, @TempDir Path cacheDir) throws IOExcept
49
49
CachedFileTest .cacheDir = cacheDir ;
50
50
cacheStore = new CacheStoreTestImpl (cacheDir );
51
51
// build a fake cache with several installers
52
- cacheStore .addToCache ("wls_" + ver12213 , path12213 .toString ());
52
+ cacheStore .addToCache ("wls_" + VER_12213 , path12213 .toString ());
53
53
cacheStore .addToCache ("wls_12.2.1.4.0_" + BuildPlatform .getPlatformName (), path12214 .toString ());
54
54
cacheStore .addToCache ("wls_14.1.1.0.0_amd64" , path1411 .toString ());
55
55
@@ -83,7 +83,7 @@ void userProvidedPatchVersionAsId() {
83
83
}
84
84
85
85
@ Test
86
- void resolveFileNotFound () throws Exception {
86
+ void resolveFileNotFound () {
87
87
// resolve should fail for a CachedFile that is not in the store
88
88
CachedFile fakeFile = new CachedFile (InstallerType .WLS , "10.3.6.0.0" );
89
89
assertThrows (FileNotFoundException .class , () -> fakeFile .resolve (cacheStore ));
@@ -92,15 +92,15 @@ void resolveFileNotFound() throws Exception {
92
92
@ Test
93
93
void resolveFileFindsFile () throws IOException {
94
94
// Resolve a CachedFile stored in the cache (created in test setup above)
95
- CachedFile wlsInstallerFile = new CachedFile (InstallerType .WLS , ver12213 );
96
- String expected = cacheStore .getValueFromCache ("wls_" + ver12213 );
95
+ CachedFile wlsInstallerFile = new CachedFile (InstallerType .WLS , VER_12213 );
96
+ String expected = cacheStore .getValueFromCache ("wls_" + VER_12213 );
97
97
assertEquals (expected , wlsInstallerFile .resolve (cacheStore ), "CachedFile did not resolve file" );
98
98
}
99
99
100
100
@ Test
101
101
void resolveNoArchFile () throws IOException {
102
102
// Look for a cache entry where the user specified the architecture/platform amd64
103
- CachedFile wlsNoArch = new CachedFile (InstallerType .WLS , ver12213 , "amd64" );
103
+ CachedFile wlsNoArch = new CachedFile (InstallerType .WLS , VER_12213 , "amd64" );
104
104
105
105
// verify the cache is setup as expected.
106
106
// wls_12.2.1.3.0 is in the cache, but wls_12.2.1.3.0_amd64 is NOT in the cache
@@ -138,7 +138,7 @@ void resolveFallbackToLocalArch() throws IOException {
138
138
139
139
@ Test
140
140
void copyFile (@ TempDir Path contextDir ) throws Exception {
141
- CachedFile wlsInstallerFile = new CachedFile (InstallerType .WLS , ver12213 );
141
+ CachedFile wlsInstallerFile = new CachedFile (InstallerType .WLS , VER_12213 );
142
142
// copy the file from the cache store to the fake build context directory
143
143
Path result = wlsInstallerFile .copyFile (cacheStore , contextDir .toString ());
144
144
// check to see if the file was copied correctly by examining the contents of the resulting file
0 commit comments