1 7 package com.inversoft.config.test; 8 9 10 import com.inversoft.config.ConfigBuilder; 11 import com.inversoft.config.ConfigFactory; 12 import com.inversoft.config.ConfigRegistry; 13 14 15 24 public class TestConfigFactory implements ConfigFactory { 25 26 public static boolean createBuilder = false; 27 public static boolean createRegistry = false; 28 public static boolean nullRegistry = false; 29 30 32 public ConfigBuilder createBuilder() { 33 if (createBuilder) { 34 return new TestConfigBuilder(); 35 } 36 37 return TestConfigBuilder.INSTANCE; 38 } 39 40 42 public ConfigRegistry createRegistry() { 43 if (createRegistry) { 44 return new TestConfigRegistry(); 45 } 46 47 if (nullRegistry) { 48 return null; 49 } 50 51 return TestConfigRegistry.INSTANCE; 52 } 53 54 } 55 | Popular Tags |