public class LogEventTestCase extends junit.framework.TestCase
Modifier and Type | Field and Description |
---|---|
protected LogType.Description |
description |
protected LogEvent.Factory |
factory |
protected LogType |
logtype |
Modifier | Constructor and Description |
---|---|
protected |
LogEventTestCase(String logtype) |
Modifier and Type | Method and Description |
---|---|
void |
checkDump(LogEvent.Factory factory,
BufferedReader reader) |
void |
checkDump(LogEvent.Factory factory,
String name) |
static int |
dump(LogEvent.Factory factory,
File file)
Dump every LogEvent found in the factory to the given File using platform encoding.
|
static int |
dump(LogEvent.Factory factory,
PrintWriter out)
Dump every LogEvent found in the factory to the given PrintWriter.
|
protected URL |
getResource(String name)
get a resource from the current testcase class and check it has been found
|
protected LogEvent.Factory |
newFactory(String name)
create a factory for a resource (read with platform encoding).
|
static String |
readDump(BufferedReader reader)
Read the next LogEvent dump.
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
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
protected LogType.Description description
protected LogEvent.Factory factory
protected LogEventTestCase(String logtype)
protected URL getResource(String name)
name
- the resource to getnull
RuntimeException
- if resource not foundClass.getResource(String)
protected LogEvent.Factory newFactory(String name) throws IOException
IOException
public static int dump(LogEvent.Factory factory, PrintWriter out) throws IOException, ParseException
IOException
ParseException
public static int dump(LogEvent.Factory factory, File file) throws IOException, ParseException
IOException
ParseException
public static String readDump(BufferedReader reader) throws IOException
IOException
public void checkDump(LogEvent.Factory factory, BufferedReader reader) throws IOException, ParseException
IOException
ParseException
public void checkDump(LogEvent.Factory factory, String name) throws IOException, ParseException
IOException
ParseException
Copyright © 2004–2014. All rights reserved.