1 package org.apache.velocity.test; 2 3 18 19 import java.io.File ; 20 import org.apache.velocity.VelocityContext; 21 import org.apache.velocity.util.StringUtils; 22 import junit.framework.TestCase; 23 24 31 public class TexenTestCase extends BaseTestCase 32 { 33 36 private static final String RESULTS_DIR = "../test/texen/results"; 37 38 41 private static final String COMPARE_DIR = "../test/texen/compare"; 42 43 47 public TexenTestCase() 48 { 49 super("TexenTestCase"); 50 } 51 52 public static junit.framework.Test suite() 53 { 54 return new TexenTestCase(); 55 } 56 57 60 protected void setUp () 61 { 62 } 63 64 67 public void runTest () 68 { 69 try 70 { 71 assureResultsDirectoryExists(RESULTS_DIR); 72 73 if (!isMatch(RESULTS_DIR,COMPARE_DIR,"TurbineWeather","java","java") || 74 !isMatch(RESULTS_DIR,COMPARE_DIR,"TurbineWeatherService","java","java") || 75 !isMatch(RESULTS_DIR,COMPARE_DIR,"WeatherService","java","java") || 76 !isMatch(RESULTS_DIR,COMPARE_DIR,"book","txt","txt") || 77 !isMatch(RESULTS_DIR,COMPARE_DIR,"Test","txt","txt")) 78 { 79 fail("Output is incorrect!"); 80 } 81 } 82 catch(Exception e) 83 { 84 87 } 88 } 89 } 90 | Popular Tags |