junit.com.mcdermottroe.exemplar.ui.cli
Class MainTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by junit.com.mcdermottroe.exemplar.ExemplarTestCase<T>
              extended by junit.com.mcdermottroe.exemplar.UtilityClassTestCase<Main>
                  extended by junit.com.mcdermottroe.exemplar.ui.cli.MainTest
All Implemented Interfaces:
junit.framework.Test

public class MainTest
extends UtilityClassTestCase<Main>

Test class for Main.

Since:
0.1

Field Summary
private  ExitHandler mainsOriginalHandler
          The original ExitHandler for Main.
 
Fields inherited from class junit.com.mcdermottroe.exemplar.ExemplarTestCase
DELIBERATE_PASS, testedClass, TMP
 
Constructor Summary
MainTest()
           
 
Method Summary
private  void setMainExit(boolean on)
          Turn on or off the calling of System.exit(int) in Main.
 void setUp()
          Set up the JUnit test.
 void testGetExitHandler()
          Test Main.getExitHandler().
 void testMain()
          Test Main.main(String[]).
 void testSetExitHandler()
          Test Main.setExitHandler(ExitHandler).
 
Methods inherited from class junit.com.mcdermottroe.exemplar.UtilityClassTestCase
testAllFieldsStatic, testAllMethodsStatic, testOnePrivateConstructor
 
Methods inherited from class junit.com.mcdermottroe.exemplar.ExemplarTestCase
getTestedClass, testAllMethodsBeingTested, testCorrectPackage
 
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, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mainsOriginalHandler

private ExitHandler mainsOriginalHandler
The original ExitHandler for Main.

Constructor Detail

MainTest

public MainTest()
Method Detail

setUp

public void setUp()
           throws Exception
Set up the JUnit test.

Overrides:
setUp in class ExemplarTestCase<Main>
Throws:
Exception - if TestCase.setUp() throws one.
See Also:
ExemplarTestCase.testedClass, TestCase.setUp()

testMain

public void testMain()
Test Main.main(String[]).


testGetExitHandler

public void testGetExitHandler()
Test Main.getExitHandler().


testSetExitHandler

public void testSetExitHandler()
Test Main.setExitHandler(ExitHandler).


setMainExit

private void setMainExit(boolean on)
Turn on or off the calling of System.exit(int) in Main.

Parameters:
on - True to make Main call System.exit(int), false otherwise.