1 package org.ninjasoft.magiccodes.plugins;
2
3 import junit.framework.TestCase;
4
5 import org.ninjasoft.magiccodes.plugins.NoOp;
6
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
20 org.ninjasoft.magiccodes.plugins.Xor xor = null;
21
22
23 public XorTest(String name) {
24
25 super(name);
26
27 }
28
29 protected void setUp() throws Exception {
30
31 super.setUp();
32 this.xor = createInstance();
33 }
34
35 public org.ninjasoft.magiccodes.plugins.Xor createInstance() throws Exception {
36
37 return new org.ninjasoft.magiccodes.plugins.Xor();
38
39 }
40
41 public void testDoAction() throws Exception {
42
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
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
61
62 }
63
64 public static void main(String[] args) {
65
66 junit.textui.TestRunner.run(XorTest.class);
67
68 }
69 }