1 package org.sapia.soto.state.util; 2 3 import junit.framework.TestCase; 4 5 import org.sapia.soto.state.*; 6 7 8 16 public class AssertTest extends TestCase { 17 public AssertTest(String name) { 18 super(name); 19 } 20 21 public void testMissingParam() { 22 ContextImpl ctx; 23 Result res = new Result(new StateMachine(), ctx = new ContextImpl()); 24 Scope sc = new MapScope(); 25 sc.putVal("key", "value"); 26 ctx.addScope("test", sc); 27 28 Assert a = new Assert(); 29 a.setKey("key"); 30 a.execute(res); 31 super.assertTrue(!res.isError()); 32 sc = new MapScope(); 33 ctx.addScope("test2", sc); 34 a.setScopes("test2"); 35 res = new Result(new StateMachine(), ctx); 36 a.execute(res); 37 super.assertTrue(res.isError()); 38 } 39 } 40 | Popular Tags |