1 10 package org.jgap.data.config; 11 12 import org.jgap.*; 13 import junit.framework.*; 14 15 21 public class RootConfigurationHandlerTest 22 extends JGAPTestCase { 23 24 private final static String CVS_REVISION = "$Revision: 1.1 $"; 25 26 private final static int NUM_CHROMS = 5; 28 29 private final static int NUM_GENES = 2; 31 32 public static Test suite() { 33 TestSuite suite = new TestSuite(RootConfigurationHandlerTest.class); 34 return suite; 35 } 36 37 public void testConstruct_0() throws Exception { 38 RootConfigurationHandler root = new RootConfigurationHandler(); 39 assertNull(root.getConfigProperties()); 40 } 41 42 public void testGetNameSpace_0() throws Exception { 43 RootConfigurationHandler root = new RootConfigurationHandler(); 44 assertEquals("org.jgap.Configuration",root.getNS()); 45 } 46 47 public void testGetPrivateField_0() throws Exception { 48 RootConfigurationHandler root = new RootConfigurationHandler(); 49 assertNull(root.getPrivateField(root, "nix")); 50 } 51 52 public void testGetPrivateField_1() throws Exception { 53 RootConfigurationHandler root = new RootConfigurationHandler(); 54 assertNull(root.getPrivateField(root, "CONFIG_NAMESPACe")); 55 java.lang.reflect.Field f = root.getPrivateField(root, "CONFIG_NAMESPACE"); 56 assertEquals(root.getClass(), f.getDeclaringClass()); 57 assertTrue(f.isAccessible()); 58 } 59 60 } 61 | Popular Tags |