1 5 package org.exoplatform.services.config.test; 6 7 import org.exoplatform.container.PortalContainer; 8 import org.exoplatform.services.config.ConfigurationService; 9 import org.exoplatform.services.config.impl.*; 10 import org.exoplatform.test.BasicTestCase; 11 18 public class TestConfigurationService extends BasicTestCase { 19 20 private ConfigurationService service_ ; 21 22 public TestConfigurationService(String name) { 23 super(name); 24 } 25 26 public void setUp() throws Exception { 27 PortalContainer manager = PortalContainer.getInstance(); 28 service_ = (ConfigurationService) manager.getComponentInstanceOfType(ConfigurationService.class) ; 29 } 30 31 public void tearDown() throws Exception { 32 } 33 34 public void testResourceBundleService() throws Exception { 35 ConfigurationDataImpl impl = new ConfigurationDataImpl() ; 36 impl.setData("this is a test") ; 37 service_.saveServiceConfiguration(ConfigurationDataImpl.class, impl) ; 38 39 impl = (ConfigurationDataImpl) service_.getServiceConfiguration(ConfigurationDataImpl.class) ; 40 assertTrue("expect the configuration" , impl != null) ; 41 } 42 } | Popular Tags |