package org.junitdoclet.demo;

import junit.framework.TestCase;
// JUnitDoclet begin import
import org.junitdoclet.demo.SampleClass;
// JUnitDoclet end import

/**
* Generated by JUnitDoclet, a tool provided by
* ObjectFab GmbH under LGPL.
* Please see www.junitdoclet.org, www.gnu.org
* and www.objectfab.de for informations about
* the tool, the licence and the authors.
*/


public class SampleClassTest
// JUnitDoclet begin extends_implements
extends TestCase
// JUnitDoclet end extends_implements
{
  // JUnitDoclet begin class
  org.junitdoclet.demo.SampleClass sampleclass = null;
  // JUnitDoclet end class
  
  public SampleClassTest(String name) {
    // JUnitDoclet begin method SampleClassTest
    super(name);
    // JUnitDoclet end method SampleClassTest
  }
  
  public org.junitdoclet.demo.SampleClass createInstance() {
    // JUnitDoclet begin method testcase.createInstance
    return new org.junitdoclet.demo.SampleClass();
    // JUnitDoclet end method testcase.createInstance
  }
  
  protected void setUp() throws Exception {
    // JUnitDoclet begin method testcase.setUp
    super.setUp();
    sampleclass = createInstance();
    // JUnitDoclet end method testcase.setUp
  }
  
  protected void tearDown() throws Exception {
    // JUnitDoclet begin method testcase.tearDown
    sampleclass = null;
    super.tearDown();
    // JUnitDoclet end method testcase.tearDown
  }
  
  public void testSetGetValue() throws Exception {
    // JUnitDoclet begin method setValue getValue
    int[] tests = {Integer.MIN_VALUE, -1, 0, 1, Integer.MAX_VALUE};
    
    for (int i = 0; i < tests.length; i++) {
      sampleclass.setValue(tests[i]);
      assertEquals(tests[i], sampleclass.getValue());
    }
    // JUnitDoclet end method setValue getValue
  }
  
  public void testSetIsFlag() throws Exception {
    // JUnitDoclet begin method setFlag isFlag
    boolean[] tests = {true, false};
    
    for (int i = 0; i < tests.length; i++) {
      sampleclass.setFlag(tests[i]);
      assertEquals(tests[i], sampleclass.isFlag());
    }
    // JUnitDoclet end method setFlag isFlag
  }
  
  public void testSetGetName() throws Exception {
    // JUnitDoclet begin method setName getName
    java.lang.String[] tests = {"", " ", "a", "A", "ä", "ß", "0123456789", "012345678901234567890", "\n", null};
    
    for (int i = 0; i < tests.length; i++) {
      sampleclass.setName(tests[i]);
      assertEquals(tests[i], sampleclass.getName());
    }
    // JUnitDoclet end method setName getName
  }
  
  public void testToString() throws Exception {
    // JUnitDoclet begin method toString
    // JUnitDoclet end method toString
  }
  
  
  
  /**
  * JUnitDoclet moves marker to this method, if there is not match
  * for them in the regenerated code and if the marker is not empty.
  * This way, no test gets lost when regenerating after renaming.
  * Method testVault is supposed to be empty.
  */
  public void testVault() throws Exception {
    // JUnitDoclet begin method testcase.testVault
    // JUnitDoclet end method testcase.testVault
  }
  
  public static void main(String[] args) {
    // JUnitDoclet begin method testcase.main
    junit.textui.TestRunner.run(SampleClassTest.class);
    // JUnitDoclet end method testcase.main
  }
}
