public abstract class AbstractMonitorTestCase extends junit.framework.TestCase
FileAlterationObserver Test Case.| Modifier and Type | Field and Description |
|---|---|
protected CollectionFileListener |
listener
Listener which collects file changes
|
protected FileAlterationObserver |
observer
File observer
|
protected long |
pauseTime
Time in milliseconds to pause in tests
|
protected File |
testDir
Directory for test files
|
protected String |
testDirName
Test diretory name
|
| Constructor and Description |
|---|
AbstractMonitorTestCase(String name)
Construct a new test case.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCollectionsEmpty(String label)
Check all the Collections are empty
|
protected void |
checkCollectionSizes(String label,
int dirCreate,
int dirChange,
int dirDelete,
int fileCreate,
int fileChange,
int fileDelete)
Check all the Collections have the expected sizes.
|
protected void |
createObserver(File file,
FileFilter fileFilter)
Create a
FileAlterationObserver. |
protected void |
setUp() |
protected void |
sleepHandleInterruped(long timeInMilliseconds)
Thread.sleep(timeInMilliseconds) - ignore InterruptedException
|
protected void |
tearDown() |
protected File |
touch(File file)
Either creates a file if it doesn't exist or updates the last modified date/time
if it does.
|
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, runBare, runTest, setName, toStringprotected FileAlterationObserver observer
protected CollectionFileListener listener
protected String testDirName
protected long pauseTime
public AbstractMonitorTestCase(String name)
name - The name of the testprotected void setUp() throws Exception
setUp in class junit.framework.TestCaseExceptionprotected void createObserver(File file, FileFilter fileFilter)
FileAlterationObserver.file - The directory to observefileFilter - The file filter to applyprotected void tearDown() throws Exception
tearDown in class junit.framework.TestCaseExceptionprotected void checkCollectionsEmpty(String label)
protected void checkCollectionSizes(String label, int dirCreate, int dirChange, int dirDelete, int fileCreate, int fileChange, int fileDelete)
protected File touch(File file)
file - The file to touchprotected void sleepHandleInterruped(long timeInMilliseconds)
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.