Search in sources :

Example 1 with RandomAccessDataFile

use of org.springframework.boot.loader.data.RandomAccessDataFile in project spring-boot by spring-projects.

the class CentralDirectoryParserTests method setup.

@Before
public void setup() throws Exception {
    this.jarFile = this.temporaryFolder.newFile();
    TestJarCreator.createTestJar(this.jarFile);
    this.jarData = new RandomAccessDataFile(this.jarFile);
}
Also used : RandomAccessDataFile(org.springframework.boot.loader.data.RandomAccessDataFile) Before(org.junit.Before)

Example 2 with RandomAccessDataFile

use of org.springframework.boot.loader.data.RandomAccessDataFile in project spring-boot by spring-projects.

the class JarFileTests method close.

@Test
public void close() throws Exception {
    RandomAccessDataFile randomAccessDataFile = spy(new RandomAccessDataFile(this.rootJarFile, 1));
    JarFile jarFile = new JarFile(randomAccessDataFile);
    jarFile.close();
    verify(randomAccessDataFile).close();
}
Also used : RandomAccessDataFile(org.springframework.boot.loader.data.RandomAccessDataFile) Test(org.junit.Test)

Aggregations

RandomAccessDataFile (org.springframework.boot.loader.data.RandomAccessDataFile)2 Before (org.junit.Before)1 Test (org.junit.Test)1