1 28 29 package com.idaremedia.antx.tests; 30 31 import junit.framework.TestSuite; 32 33 import com.idaremedia.antx.ut.HTC; 34 import com.idaremedia.antx.ut.HTCUtils; 35 36 45 46 public class TallyTaskTest extends HTC 47 { 48 49 public static final String TEST_CATEGORY="CLASS"; 50 51 52 55 public TallyTaskTest(String methodName) 56 { 57 super("TallyTask::",methodName); 58 } 59 60 61 64 public static TestSuite suite() 65 { 66 return new TestSuite(TallyTaskTest.class); 67 } 68 69 70 73 public static TestSuite baseline() 74 { 75 return suite(); 76 } 77 78 79 82 public static void main(String [] argv) 83 { 84 HTCUtils.quickCheck(suite()); 85 } 86 87 88 92 protected void setUp() throws Exception 93 { 94 configureProjectFromResource("tally.xml"); 95 } 96 97 101 public void checkBaseline() 102 { 103 } 105 106 public void testBaseline() 107 { 108 checkBaseline(); 109 } 110 111 public void testEmptyTallyIsBroken() 112 { 113 String log= runExpecting("testEmptyIsBroken","Empty Tally"); 114 println("*** THROWN: "+getBuildException().getMessage()); 115 println("FFFUUUUUULLLLL LOG:",getFullLog()); 116 assertTrue(log.indexOf("At least one condition")>-1,"Empty tally broken"); 117 } 118 119 public void testTallyReferrals() 120 { 121 runTargetDumpFullLog("testTallyReferrals"); 122 } 123 124 public void testNestedAssert() 125 { 126 runTargetDumpFullLog("testNestedAssert"); 127 } 128 129 public void testNestedPrefer() 130 { 131 runTargetDumpFullLog("testNestedPrefer"); 132 } 133 134 public void testSimpleTallies() 135 { 136 runTargetDumpFullLog("testSimpleTallies"); 137 } 138 139 140 public void testTallyAll_AntX03() 141 { 142 runTargetDumpFullLog("testTallyAll_AntX03"); 143 } 144 145 146 public void testSimpleTallySets_AntX03() 147 { 148 runTargetDumpFullLog("testSimpleTallySets_AntX03"); 149 } 150 151 152 public void testBrokenCircularTallySets_AntX03() 153 { 154 String log= runExpecting("testBrokenTallySets_AntX03","Circular TallySets"); 155 println("*** THROWN: "+getBuildException().getMessage()); 156 println("FFFUUUUUULLLLL LOG:",getFullLog()); 157 assertTrue(log.indexOf("circular dependency")>-1,"Circular tallyset broken"); 158 } 159 160 161 public void testCustomConditions_AntX04() 162 { 163 runTarget("testCustomConditions_AntX04"); 164 } 165 } 166 167 168 | Popular Tags |