List of usage examples for com.liferay.portal.kernel.configuration ConfigurationFactoryUtil setConfigurationFactory
public static void setConfigurationFactory(ConfigurationFactory configurationFactory)
From source file:com.liferay.dynamic.data.mapping.BaseDDMTestCase.java
License:Open Source License
protected void setUpConfigurationFactoryUtil() { mockStatic(ConfigurationFactoryUtil.class); when(_configurationFactory.getConfiguration(Matchers.any(ClassLoader.class), Matchers.anyString())) .thenReturn(_configuration); ConfigurationFactoryUtil.setConfigurationFactory(_configurationFactory); }
From source file:com.liferay.sync.model.SyncDLObjectUpdateTest.java
License:Open Source License
@Before public void setUp() throws Exception { ConfigurationFactoryUtil.setConfigurationFactory(new ConfigurationFactoryImpl()); JSONFactoryUtil jsonFactoryUtil = new JSONFactoryUtil(); jsonFactoryUtil.setJSONFactory(new JSONFactoryImpl()); PortletClassLoaderUtil.setServletContextName("sync-web"); }
From source file:org.politaktiv.setofopinions.domain.TopicTest.java
License:Apache License
@Test public void test() { ConfigurationFactoryUtil.setConfigurationFactory(new DummyConfigurationFactory()); TopicImpl t = new TopicImpl(); t.setName("Das ist ein tller Tet"); assertTrue(t.validate());/*from w w w . ja v a 2 s . c o m*/ t.setName("Das ist ein plder' Test"); assertFalse(t.validate()); }