1 10 package org.jgap.data.config; 11 12 import java.util.*; 13 import org.jgap.*; 14 import junit.framework.*; 15 16 22 public class MetaConfigTest 23 extends JGAPTestCase { 24 25 private final static String CVS_REVISION = "$Revision: 1.1 $"; 26 27 private final static int NUM_CHROMS = 5; 29 30 private final static int NUM_GENES = 2; 32 33 public static Test suite() { 34 TestSuite suite = new TestSuite(MetaConfigTest.class); 35 return suite; 36 } 37 38 public void testSingleton_0() throws Exception { 39 MetaConfig mc = MetaConfig.getInstance(); 40 assertSame(MetaConfig.getInstance(), mc); 41 assertSame(MetaConfig.getInstance(), mc); 42 } 43 44 public void testGetConfigProperty_0() throws Exception { 45 MetaConfig mc = MetaConfig.getInstance(); 46 List props = mc.getConfigProperty("org.jgap.Configuration"); 47 assertEquals(4, props.size()); 48 props = mc.getConfigProperty("org.jgap.impl.TournamentSelector"); 49 assertEquals(1, props.size()); 50 } 51 52 } 53 | Popular Tags |