1 package org.ninjasoft.magiccodes.plugins; 2 3 import junit.framework.TestCase; 4 // JUnitDoclet begin import 5 import org.ninjasoft.magiccodes.plugins.NoOp; 6 // JUnitDoclet end import 7 8 /*** 9 * Generated by JUnitDoclet, a tool provided by 10 * ObjectFab GmbH under LGPL. 11 * Please see www.junitdoclet.org, www.gnu.org 12 * and www.objectfab.de for informations about 13 * the tool, the licence and the authors. 14 */ 15 16 17 public abstract class PluginTestBase 18 // JUnitDoclet begin extends_implements 19 extends TestCase 20 // JUnitDoclet end extends_implements 21 { 22 protected int[] arrayA; 23 protected int[] arrayZ; 24 protected int[] arrayAZ; 25 protected int[] empty = new int[0]; 26 27 protected int[] copyArray(int[] in) { 28 int[] result = new int[in.length]; 29 for (int i=0; i<in.length; i++) 30 result[i] = in[i]; 31 return result; 32 } 33 34 public void assertArraysEqual(int[] a1, int[] a2) { 35 if (a1.length != a2.length) 36 assertTrue("Arrays differ in size: " + a1.length + "," + a2.length, false); 37 for (int i=0; i<a1.length; i++) 38 assertEquals("Value at position " + i + " does not match (" + a1[i] + "," + a2[i] + ")", a1[i], a2[i]); 39 } 40 41 public PluginTestBase(String name) { 42 // JUnitDoclet begin method NoOpTest 43 super(name); 44 // JUnitDoclet end method NoOpTest 45 } 46 47 protected void setUp() throws Exception { 48 // JUnitDoclet begin method testcase.setUp 49 super.setUp(); 50 arrayA = new int[70]; 51 arrayZ = new int[70]; 52 arrayAZ = new int[26]; 53 for (int i=0; i<70; i++) { 54 arrayA[i] = 'A'; 55 arrayZ[i] = 'Z'; 56 } 57 for (int i=0; i<26; i++) 58 arrayAZ[i] = 'A' + i; 59 // JUnitDoclet end method testcase.setUp 60 } 61 62 protected void tearDown() throws Exception { 63 // JUnitDoclet begin method testcase.tearDown 64 super.tearDown(); 65 // JUnitDoclet end method testcase.tearDown 66 } 67 68 public void testGetName() throws Exception { 69 // JUnitDoclet begin method getName 70 assertTrue(true); 71 // JUnitDoclet end method getName 72 } 73 74 public void testGetDescription() throws Exception { 75 // JUnitDoclet begin method getDescription 76 assertTrue(true); 77 // JUnitDoclet end method getDescription 78 } 79 80 public abstract void testDoAction() throws Exception; 81 82 /*** 83 * JUnitDoclet moves marker to this method, if there is not match 84 * for them in the regenerated code and if the marker is not empty. 85 * This way, no test gets lost when regenerating after renaming. 86 * Method testVault is supposed to be empty. 87 */ 88 public void testVault() throws Exception { 89 // JUnitDoclet begin method testcase.testVault 90 // JUnitDoclet end method testcase.testVault 91 } 92 93 }

This page was automatically generated by Maven