Search in sources :

Example 6 with DebugConfigurationFromProperties

use of com.sun.identity.shared.debug.file.impl.DebugConfigurationFromProperties in project OpenAM by OpenRock.

the class DebugTestTemplate method initializeProvider.

/**
     * Initialize the debug provider
     *
     * @param debugConfigPath
     */
public void initializeProvider(String debugConfigPath) throws InvalidDebugConfigurationException {
    DebugConfigurationFromProperties debugConfig = new DebugConfigurationFromProperties(debugConfigPath);
    debugFileProvider = new DebugFileProviderForTest(debugConfig, TimeService.SYSTEM);
    provider = new DebugProviderImpl(debugFileProvider);
}
Also used : DebugConfigurationFromProperties(com.sun.identity.shared.debug.file.impl.DebugConfigurationFromProperties) DebugProviderImpl(com.sun.identity.shared.debug.impl.DebugProviderImpl)

Example 7 with DebugConfigurationFromProperties

use of com.sun.identity.shared.debug.file.impl.DebugConfigurationFromProperties in project OpenAM by OpenRock.

the class DebugConfigurationFromPropertiesTest method sizeAndTimeRotationConfig.

@Test
public void sizeAndTimeRotationConfig() throws Exception {
    DebugConfigurationFromProperties debugConfigurationFromProperties = new DebugConfigurationFromProperties(DEBUG_CONFIG_DIRECTORY + "valid/sizeAndTimeRotationConfig.properties");
    Assert.assertTrue(debugConfigurationFromProperties.getDebugPrefix().isEmpty(), "Debug prefix should be empty");
    Assert.assertEquals(debugConfigurationFromProperties.getDebugSuffix(), "-MM.dd.yyyy-HH.mm.ss.SSS");
    Assert.assertEquals(debugConfigurationFromProperties.getRotationInterval(), 3);
    Assert.assertEquals(debugConfigurationFromProperties.getRotationFileSizeInByte(), 2 << 20);
}
Also used : DebugConfigurationFromProperties(com.sun.identity.shared.debug.file.impl.DebugConfigurationFromProperties) Test(org.testng.annotations.Test)

Example 8 with DebugConfigurationFromProperties

use of com.sun.identity.shared.debug.file.impl.DebugConfigurationFromProperties in project OpenAM by OpenRock.

the class DebugTestTemplate method initializeProvider.

/**
     * Initialize the debug provider
     *
     * @param debugConfigPath
     */
public void initializeProvider(String debugConfigPath) throws InvalidDebugConfigurationException {
    DebugConfigurationFromProperties debugConfig = new DebugConfigurationFromProperties(debugConfigPath);
    debugFileProvider = new DebugFileProviderForTest(debugConfig, TimeService.SYSTEM);
    provider = new DebugProviderImpl(debugFileProvider);
}
Also used : DebugConfigurationFromProperties(com.sun.identity.shared.debug.file.impl.DebugConfigurationFromProperties) DebugProviderImpl(com.sun.identity.shared.debug.impl.DebugProviderImpl)

Aggregations

DebugConfigurationFromProperties (com.sun.identity.shared.debug.file.impl.DebugConfigurationFromProperties)8 Test (org.testng.annotations.Test)5 DebugProviderImpl (com.sun.identity.shared.debug.impl.DebugProviderImpl)2 AccelerateTimeService (com.sun.identity.shared.timeservice.AccelerateTimeService)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 Calendar (java.util.Calendar)1