Class TestDefaults

  • All Implemented Interfaces:
    junit.framework.Test

    public class TestDefaults
    extends junit.framework.TestCase
    Tests JSAP's handling of default values.
    Author:
    Marty Lamb
    • Constructor Summary

      Constructors 
      Constructor Description
      TestDefaults()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setUp()
      Configures the JSAP object for the tests.
      static junit.framework.Test suite()
      Returns the tests defined in this class.
      void tearDown()
      Cleans up the JSAP object.
      void testConfig()
      Ensures that the setUp() method was successful.
      void testDefaults2()
      Another test of parameter-level defaults.
      void testOneLevelDefaults()
      Tests a single level of property defaults.
      void testRequired()
      Tests JSAP's enforcing of required parameters.
      void testSimpleDefault()
      Tests the parameter-level defaults.
      • Methods inherited from class junit.framework.TestCase

        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, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TestDefaults

        public TestDefaults()
    • Method Detail

      • suite

        public static junit.framework.Test suite()
        Returns the tests defined in this class.
        Returns:
        the tests defined in this class.
      • testConfig

        public void testConfig()
        Ensures that the setUp() method was successful.
      • testSimpleDefault

        public void testSimpleDefault()
        Tests the parameter-level defaults.
      • testDefaults2

        public void testDefaults2()
        Another test of parameter-level defaults.
      • testRequired

        public void testRequired()
        Tests JSAP's enforcing of required parameters.
      • testOneLevelDefaults

        public void testOneLevelDefaults()
        Tests a single level of property defaults.
      • setUp

        public void setUp()
                   throws JSAPException
        Configures the JSAP object for the tests.
        Throws:
        JSAPException - if the JSAP object cannot be instantiated.
      • tearDown

        public void tearDown()
        Cleans up the JSAP object.