1 26 27 package net.sourceforge.groboutils.mbtf.v1.ant; 28 29 import org.apache.tools.ant.Project; 30 import org.apache.tools.ant.Task; 31 import org.apache.tools.ant.TaskAdapter; 32 import org.apache.tools.ant.BuildException; 33 import org.apache.tools.ant.types.Reference; 34 import org.apache.tools.ant.types.DataType; 35 import org.apache.tools.ant.taskdefs.Definer; 36 37 import org.easymock.EasyMock; 38 import org.easymock.MockControl; 39 import junit.framework.Test; 40 import junit.framework.TestCase; 41 import junit.framework.TestSuite; 42 43 import net.sourceforge.groboutils.mbtf.v1.IValidate; 44 import net.sourceforge.groboutils.mbtf.v1.ISystem; 45 import net.sourceforge.groboutils.mbtf.v1.IErrors; 46 import net.sourceforge.groboutils.mbtf.v1.IAction; 47 48 55 public class TransitionTypeUTest extends TestCase 56 { 57 60 private static final Class THIS_CLASS = TransitionTypeUTest.class; 61 62 public TransitionTypeUTest( String name ) 63 { 64 super( name ); 65 } 66 67 68 71 75 protected void setUp() throws Exception 76 { 77 super.setUp(); 78 79 } 81 82 83 86 87 public void testConstructor1() 88 { 89 createTransitionType(); 90 } 91 92 93 public void testSetJavaActionRef1() 94 { 95 TransitionType tt = createTransitionType(); 96 Reference r = new Reference( "javatype" ); 97 TaskAdapter ta = new TaskAdapter(); 98 ValidateJavaType vjt = new ValidateJavaType(); 99 ta.setProxy( vjt ); 100 this.project.addReference( "javatype", vjt ); 101 102 tt.setJavaActionRef( r ); 103 } 104 105 106 109 protected Project project; 110 protected TransitionType createTransitionType() 111 { 112 this.project = new Project(); 113 TransitionType tt = new TransitionType(); 114 tt.setProject( this.project ); 115 return tt; 116 } 117 118 121 122 public static Test suite() 123 { 124 TestSuite suite = new TestSuite( THIS_CLASS ); 125 126 137 return suite; 138 } 139 140 public static void main( String [] args ) 141 { 142 String [] name = { THIS_CLASS.getName() }; 143 144 147 junit.textui.TestRunner.main( name ); 148 } 149 150 151 155 protected void tearDown() throws Exception 156 { 157 159 super.tearDown(); 160 } 161 } 162 163 | Popular Tags |