public class VirtualFileTest extends BaseTestCase
VirtualFile
.Modifier and Type | Field and Description |
---|---|
private static int |
dbStoreIndex
A counter used to obtain unique data store names.
|
private java.lang.String[] |
NON_EXISTING_DIRS |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
VirtualFileTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private static org.apache.derby.impl.io.vfmem.DataStore |
getStore()
Utility method returning a fresh data store.
|
static junit.framework.Test |
suite() |
void |
testCloseIdempotent()
Verify that the close() method of VirtualRandomAccessFile can be
called more than once.
|
void |
testCreateDirInRoot() |
void |
testCreateFileInRoot() |
void |
testCreateInvalidDir() |
void |
testCreateRoot()
Makes sure that the root can be created.
|
void |
testDeleteAll() |
void |
testGetParentAbsolute() |
void |
testGetParentRelative() |
void |
testGetRAExistingReadOnly()
Opens a random access file for a file which has been marked as read-only.
|
void |
testGetRAFNonExisting()
Getting a random access file in write mode for a non-existing file
should cause the file to be created.
|
void |
testGetRAFNonExistingReadMode()
Getting a random access file in read mode for a non-existing file
should fail, and the file shouldn't be created.
|
void |
testGetRAFOnDirectory()
Opening a random access file on a directory should fail.
|
void |
testListChilderen()
Tests that
listChildren doesn't include too many entries. |
void |
testMkdirsInvalidAbsolute() |
void |
testMkdirsInvalidRelative() |
void |
testMkdirsValidAbsolute() |
void |
testMkdirsValidRelative() |
void |
testRenameToSimple() |
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runBare, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, setUp, tearDown, toString
private final java.lang.String[] NON_EXISTING_DIRS
private static int dbStoreIndex
public void testCreateFileInRoot()
public void testCreateDirInRoot()
public void testCreateInvalidDir()
public void testMkdirsValidRelative()
public void testMkdirsValidAbsolute()
public void testMkdirsInvalidAbsolute() throws java.io.IOException
java.io.IOException
public void testMkdirsInvalidRelative() throws java.io.IOException
java.io.IOException
public void testGetParentRelative()
public void testGetParentAbsolute()
public void testDeleteAll() throws java.io.IOException
java.io.IOException
public void testRenameToSimple()
public void testGetRAFNonExisting() throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void testGetRAFNonExistingReadMode() throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void testGetRAExistingReadOnly() throws java.io.FileNotFoundException
Opening for reading only should work, opening for writing should fail.
java.io.FileNotFoundException
public void testGetRAFOnDirectory()
public void testListChilderen()
listChildren
doesn't include too many entries.public void testCreateRoot()
public void testCloseIdempotent() throws java.io.IOException
java.io.IOException
public static junit.framework.Test suite()
private static org.apache.derby.impl.io.vfmem.DataStore getStore()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.