01: package com.ecyrd.jspwiki.workflow;
02:
03: import junit.framework.TestCase;
04:
05: public class FactTest extends TestCase {
06:
07: public void testCreate() {
08: Fact f1 = new Fact("fact1", new Integer(1));
09: Fact f2 = new Fact("fact2", "A factual String");
10: Fact f3 = new Fact("fact3", Outcome.DECISION_ACKNOWLEDGE);
11:
12: assertEquals("fact1", f1.getMessageKey());
13: assertEquals("fact2", f2.getMessageKey());
14: assertEquals("fact3", f3.getMessageKey());
15:
16: assertEquals(new Integer(1), f1.getValue());
17: assertEquals("A factual String", f2.getValue());
18: assertEquals(Outcome.DECISION_ACKNOWLEDGE, f3.getValue());
19: }
20:
21: }
|