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 class XorTest extends PluginTestBase 18 { 19 // JUnitDoclet begin class 20 org.ninjasoft.magiccodes.plugins.Xor xor = null; 21 // JUnitDoclet end class 22 23 public XorTest(String name) { 24 // JUnitDoclet begin method NoOpTest 25 super(name); 26 // JUnitDoclet end method NoOpTest 27 } 28 29 protected void setUp() throws Exception { 30 // JUnitDoclet begin method testcase.setUp 31 super.setUp(); 32 this.xor = createInstance(); 33 } 34 35 public org.ninjasoft.magiccodes.plugins.Xor createInstance() throws Exception { 36 // JUnitDoclet begin method testcase.createInstance 37 return new org.ninjasoft.magiccodes.plugins.Xor(); 38 // JUnitDoclet end method testcase.createInstance 39 } 40 41 public void testDoAction() throws Exception { 42 // JUnitDoclet begin method doAction 43 int[] data = new int[] {'A', 'B', 'C'}; 44 int[] key = new int[] {'A', 'A', 'A'}; 45 data = xor.doAction(data, key); 46 assertEquals(data[0], 0); 47 assertEquals(data[1], 3); 48 assertEquals(data[2], 2); 49 // JUnitDoclet end method doAction 50 } 51 52 53 /*** 54 * JUnitDoclet moves marker to this method, if there is not match 55 * for them in the regenerated code and if the marker is not empty. 56 * This way, no test gets lost when regenerating after renaming. 57 * Method testVault is supposed to be empty. 58 */ 59 public void testVault() throws Exception { 60 // JUnitDoclet begin method testcase.testVault 61 // JUnitDoclet end method testcase.testVault 62 } 63 64 public static void main(String[] args) { 65 // JUnitDoclet begin method testcase.main 66 junit.textui.TestRunner.run(XorTest.class); 67 // JUnitDoclet end method testcase.main 68 } 69 }

This page was automatically generated by Maven