1 /* 2 * ClusterFinder_Test.java 3 * 4 * Created on July 24, 2007, 4:33 PM 5 * 6 * $Id: ClusterFinder_Test.java,v 1.1.1.1 2010/04/08 20:38:00 jeremy Exp $ 7 */ 8 9 package org.lcsim.recon.tracking.trflayer; 10 11 import junit.framework.TestCase; 12 import org.lcsim.recon.tracking.trfbase.ETrack; 13 import org.lcsim.recon.tracking.trfbase.SurfTest; 14 import org.lcsim.recon.tracking.trfutil.Assert; 15 16 /** 17 * 18 * @author Norman Graf 19 */ 20 public class ClusterFinder_Test extends TestCase 21 { 22 private boolean debug; 23 /** Creates a new instance of ClusterFinder_Test */ 24 public void testClusterFinder() 25 { 26 String component = "ClusterFinder"; 27 String ok_prefix = component + " (I): "; 28 String error_prefix = component + " test (E): "; 29 30 if(debug) System.out.println(ok_prefix 31 + "-------- Testing component " + component 32 + ". --------" ); 33 34 //******************************************************************** 35 36 if(debug) System.out.println(ok_prefix + "Test constructor." ); 37 ClusterFinderTest find = new ClusterFinderTest(3.0); 38 if(debug) System.out.println(find ); 39 Assert.assertTrue( find.surface().parameter(0) == 3.0 ); 40 Assert.assertTrue( find.clusters().size() == 0 ); 41 ETrack tre = new ETrack( new SurfTest(3.0) ); 42 Assert.assertTrue( find.clusters(tre).size() == 0 ); 43 44 //******************************************************************** 45 46 if(debug) System.out.println(ok_prefix 47 + "------------- All tests passed. -------------" ); 48 49 //******************************************************************** 50 } 51 52 }