public class BookFactoryTest
extends junit.framework.TestCase
Modifier and Type | Field and Description |
---|---|
private BookFactory |
bookFactory |
Constructor and Description |
---|
BookFactoryTest(java.lang.String testName)
Test BookFactory related operations
|
Modifier and Type | Method and Description |
---|---|
private void |
exceptionTest()
Test exception cases and error handling of the class
|
private void |
newBookTest()
Test the newBook function
|
private void |
outputAndInputTest()
Test the class in writing to and reading from files
|
void |
setUp()
Set up before testing
|
static junit.framework.Test |
suite() |
void |
tearDown()
Delete files created during test
|
void |
testApp()
Run all tests
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
private BookFactory bookFactory
public BookFactoryTest(java.lang.String testName)
testName
- name of the test caseprivate void exceptionTest()
private void newBookTest()
private void outputAndInputTest()
public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
- Exceptionpublic static junit.framework.Test suite()
public void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
- Exceptionpublic void testApp()