| java.lang.Object com.sun.midp.i3test.TestCase com.sun.midp.rms.TestFileRscLimit
TestFileRscLimit | public class TestFileRscLimit extends TestCase (Code) | | Test the global file resource limit by opening files up to and then past
the limit. To open files, this test uses the RecordStoreFile class, which
is a Java-based interface that's reasonably close to direct file access.
RecordStoreFile is a private class inside com.sun.midp.rms, so that's why
this test resides in that package.
|
Field Summary | |
final static int | EXT The file extension used when creating files. | final static int | LIMIT Shorthand for the global file limit. | final static int | SUITE The suite name used when creating files. | RecordStoreFile | rsf An array of open RecordStoreFile objects. |
Method Summary | |
String | makeName(int i) Makes a filename. | public void | runTests() Run all tests. | public void | setUp() Creates rsf, an array of LIMIT+1 RecordStoreFile objects and opens
files up to LIMIT, leaving one slot unused. | public void | tearDown() Closes and deletes any RecordStoreFile objects found in the rsf array. | void | testFileHandlesRscLimit() Opens one more file than the global file resource limit and checks to
see that the last one throws an exception. |
EXT | final static int EXT(Code) | | The file extension used when creating files.
|
LIMIT | final static int LIMIT(Code) | | Shorthand for the global file limit.
|
SUITE | final static int SUITE(Code) | | The suite name used when creating files.
|
rsf | RecordStoreFile rsf(Code) | | An array of open RecordStoreFile objects.
|
makeName | String makeName(int i)(Code) | | Makes a filename.
Parameters: i - a small integer used in creating the filename the filename just created |
setUp | public void setUp() throws IOException(Code) | | Creates rsf, an array of LIMIT+1 RecordStoreFile objects and opens
files up to LIMIT, leaving one slot unused.
|
tearDown | public void tearDown()(Code) | | Closes and deletes any RecordStoreFile objects found in the rsf array.
Ignores any errors that might occur.
|
testFileHandlesRscLimit | void testFileHandlesRscLimit() throws IOException(Code) | | Opens one more file than the global file resource limit and checks to
see that the last one throws an exception.
|
Methods inherited from com.sun.midp.i3test.TestCase | public void assertEquals(Object expected, Object actual)(Code)(Java Doc) public void assertEquals(String message, Object expected, Object actual)(Code)(Java Doc) public void assertEquals(int expected, int actual)(Code)(Java Doc) public void assertEquals(String message, int expected, int actual)(Code)(Java Doc) public void assertFalse(boolean condition)(Code)(Java Doc) public void assertFalse(String message, boolean condition)(Code)(Java Doc) public void assertNotNull(Object object)(Code)(Java Doc) public void assertNotNull(String message, Object object)(Code)(Java Doc) public void assertNotSame(Object expected, Object actual)(Code)(Java Doc) public void assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertNull(Object object)(Code)(Java Doc) public void assertNull(String message, Object object)(Code)(Java Doc) public void assertSame(Object expected, Object actual)(Code)(Java Doc) public void assertSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertTrue(String message, boolean condition)(Code)(Java Doc) public void assertTrue(boolean condition)(Code)(Java Doc) public void declare(String testName)(Code)(Java Doc) public void fail()(Code)(Java Doc) public void fail(String message)(Code)(Java Doc) protected SecurityToken getSecurityToken()(Code)(Java Doc) protected boolean getVerbose()(Code)(Java Doc) public void info(String s)(Code)(Java Doc) abstract public void runTests() throws Throwable(Code)(Java Doc)
|
|
|