Search in sources :

Example 41 with ConfigurationSource

use of org.xwiki.configuration.ConfigurationSource in project xwiki-platform by xwiki.

the class DefaultStandardURLConfigurationTest method isViewActionHidden.

@Test
public void isViewActionHidden() throws Exception {
    ConfigurationSource source = this.mocker.getInstance(ConfigurationSource.class, "xwikiproperties");
    when(source.getProperty("url.standard.hideViewAction", false)).thenReturn(false);
    assertFalse(this.mocker.getComponentUnderTest().isViewActionHidden());
}
Also used : ConfigurationSource(org.xwiki.configuration.ConfigurationSource)

Example 42 with ConfigurationSource

use of org.xwiki.configuration.ConfigurationSource in project xwiki-platform by xwiki.

the class DefaultStandardURLConfigurationTest method isPathBasedMultiWiki.

@Test
public void isPathBasedMultiWiki() throws Exception {
    ConfigurationSource source = this.mocker.getInstance(ConfigurationSource.class, "xwikiproperties");
    when(source.getProperty("url.standard.multiwiki.isPathBased", Boolean.TRUE)).thenReturn(Boolean.TRUE);
    assertTrue(this.mocker.getComponentUnderTest().isPathBasedMultiWiki());
}
Also used : ConfigurationSource(org.xwiki.configuration.ConfigurationSource)

Aggregations

ConfigurationSource (org.xwiki.configuration.ConfigurationSource)42 Test (org.junit.Test)29 Properties (java.util.Properties)7 XWikiContext (com.xpn.xwiki.XWikiContext)3 XWikiDocument (com.xpn.xwiki.doc.XWikiDocument)3 XWikiCfgConfigurationSource (com.xpn.xwiki.internal.XWikiCfgConfigurationSource)3 ArrayList (java.util.ArrayList)3 Expectations (org.jmock.Expectations)3 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)3 InvocationOnMock (org.mockito.invocation.InvocationOnMock)3 Parser (org.xwiki.rendering.parser.Parser)3 Syntax (org.xwiki.rendering.syntax.Syntax)3 SyntaxType (org.xwiki.rendering.syntax.SyntaxType)3 ContextualAuthorizationManager (org.xwiki.security.authorization.ContextualAuthorizationManager)3 CoreConfiguration (com.xpn.xwiki.CoreConfiguration)2 File (java.io.File)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 List (java.util.List)2 Map (java.util.Map)2