1 28 29 package com.idaremedia.antx.flowcontrol.tests; 30 31 import junit.framework.TestSuite; 32 33 import com.idaremedia.antx.ut.HTC; 34 import com.idaremedia.antx.ut.HTCUtils; 35 36 46 47 public final class StopTaskTest extends HTC 48 { 49 50 public static final String TEST_CATEGORY="CLASS"; 51 52 53 56 public StopTaskTest(String methodName) 57 { 58 super("StopTask::",methodName); 59 } 60 61 62 65 public static TestSuite suite() 66 { 67 return new TestSuite(StopTaskTest.class); 68 } 69 70 71 74 public static TestSuite baseline() 75 { 76 return suite(); 77 } 78 79 80 83 public static void main(String [] argv) 84 { 85 HTCUtils.quickCheck(suite()); 86 } 87 88 89 93 protected void setUp() throws Exception 94 { 95 configureProjectFromResource("stop.xml"); 96 } 97 98 102 public void checkBaseline() 103 { 104 } 106 107 public void testBaseline() 108 { 109 checkBaseline(); 110 } 111 112 public void testEmptyElementOK() 113 { 114 runTarget("testEmptyElementOK"); 115 } 116 117 public void testMessageIncluded() 118 { 119 runTarget("testMessageIncluded"); 120 } 121 122 public void testMessageArgsIncluded() 123 { 124 runTarget("testMessageArgsIncluded"); 125 } 126 127 public void testIfUnlessConditions() 128 { 129 runTarget("testIfUnlessConditions"); 130 } 131 132 public void testFatalAbortsAll() 133 { 134 try { runTarget("testFatalAbortsAll"); 135 } catch(Throwable bX) { String error = bX.getMessage(); 137 println("*** THROWN: "+bX.getClass().getName()); 138 println(" What: "+error); 139 assertTrue(error.indexOf("fatal build error")>0,"BuildError signalled"); 140 } 144 } 145 146 public void testMsgLevelControlled() 147 { 148 runTarget("testMsgLevelControlled"); 149 String debugMsg= "SillyThingToDoWithStop"; 150 String realLog = getFullLog(); 151 assertTrue("expecting full log to contain \""+debugMsg+"\" log was \"" 152 + realLog + "\"", 153 realLog.indexOf(debugMsg) >= 0); 154 } 155 } 156 157 158 | Popular Tags |