|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.qpid.util.LogMonitorTest
public class LogMonitorTest
Constructor Summary | |
---|---|
LogMonitorTest()
|
Method Summary | |
---|---|
void |
setUp()
|
void |
testFindMatches_Match()
Test that Log file matches logged messages. |
void |
testFindMatches_NoMatch()
Test that Log file does not match a message not logged. |
void |
testMonitor()
Test that a new file is created when attempting to set up a monitor with the default constructor. |
void |
testMonitorNonExistentFile()
Test that a new file is created when attempting to set up a monitor on a non existing file. |
void |
testMonitorNormalFile()
Test that creation of a monitor on an existing file is possible This also tests taht getMonitoredFile works |
void |
testMonitorNullFile()
Test that a new file is created when attempting to set up a monitor on a null input value. |
void |
testRead()
|
void |
testReset()
|
void |
testWaitForMessage_Timeout()
|
protected void |
validateLogContainsMessage(LogMonitor log,
String message)
Validate that the LogMonitor can match the given string in the log |
protected void |
validateLogDoesNotContainsMessage(LogMonitor log,
String message)
Validate that the LogMonitor does not match the given string in the log |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
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, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LogMonitorTest()
Method Detail |
---|
public void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
public void testMonitor()
public void testMonitorNormalFile() throws IOException
IOException
- if there is a problem creating the temporary filepublic void testMonitorNullFile()
public void testMonitorNonExistentFile() throws IOException
IOException
- if there is a problem setting up the nonexistent filepublic void testFindMatches_Match() throws IOException
IOException
- if there is a problem creating LogMontiorpublic void testFindMatches_NoMatch() throws IOException
IOException
- if there is a problem creating LogMontiorpublic void testWaitForMessage_Timeout() throws IOException
IOException
public void testReset() throws IOException
IOException
public void testRead() throws IOException
IOException
protected void validateLogDoesNotContainsMessage(LogMonitor log, String message) throws IOException
log
- The LogMonitor to checkmessage
- The message to check for
IOException
- if a problems occursprotected void validateLogContainsMessage(LogMonitor log, String message) throws IOException
log
- The LogMonitor to checkmessage
- The message to check for
IOException
- if a problems occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |