コード例 #1
0
  /** Basic test of the <code>isActive()</code> method. */
  public void testMethod_isActive() {
    classImpl = new ClassImpl();

    assertFalse("The isActive method is incorrect.", classImpl.isActive());

    // set to true and test it.
    classImpl.setActive(true);
    assertTrue("The isActive method is incorrect.", classImpl.isActive());
  }
コード例 #2
0
  /**
   * Detail test of <code>ClassImpl()</code> constructor. Creates a instance and get its attributes
   * for test.
   */
  public void testCtor_ClassImpl() {
    classImpl = new ClassImpl();

    // check null here.
    assertNotNull("Create ClassImpl failed.", classImpl);

    // check the value here.
    assertFalse("The ctor of ClassImpl is incorrect.", classImpl.isActive());
  }