package org.junitdoclet.demo.sub; import org.junit.Test; import org.junit.After; import org.junit.Before; import org.junit.AfterClass; import org.junit.BeforeClass; import static junit.framework.Assert.assertEquals; // JUnitDoclet begin import // make sure to add your own imports here // 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 SampleSubClassTest // JUnitDoclet begin extends_implements // JUnitDoclet end extends_implements { // JUnitDoclet begin class org.junitdoclet.demo.sub.SampleSubClass samplesubclass = null; // JUnitDoclet end class public SampleSubClassTest() { // JUnitDoclet begin method SampleSubClassTest // JUnitDoclet end method SampleSubClassTest } public org.junitdoclet.demo.sub.SampleSubClass createInstance() throws Exception { // JUnitDoclet begin method testcase.createInstance return new org.junitdoclet.demo.sub.SampleSubClass(); // JUnitDoclet end method testcase.createInstance } @Before public void before() throws Exception { // JUnitDoclet begin method testcase.before samplesubclass = createInstance(); // JUnitDoclet end method testcase.before } @After public void after() throws Exception { // JUnitDoclet begin method testcase.after samplesubclass = null; // JUnitDoclet end method testcase.after } @BeforeClass public static void beforeClass() throws Exception { // JUnitDoclet begin method testcase.beforeClass // JUnitDoclet end method testcase.beforeClass } @AfterClass public static void afterClass() throws Exception { // JUnitDoclet begin method testcase.afterClass // JUnitDoclet end method testcase.afterClass } @Test public void testSetGetDoubleValue() throws Exception { // JUnitDoclet begin method setDoubleValue getDoubleValue double[] tests = {Double.MIN_VALUE, -1.0, -0.5, 0.0, 0.5, 1.0, Double.MAX_VALUE}; for (int i = 0; i < tests.length; i++) { samplesubclass.setDoubleValue(tests[i]); assertEquals(tests[i], samplesubclass.getDoubleValue()); } // JUnitDoclet end method setDoubleValue getDoubleValue } @Test 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. * @throws Exception Any exception the enclosed code may throw. */ @Test public void testVault() throws Exception { // JUnitDoclet begin method testcase.testVault // JUnitDoclet end method testcase.testVault } }