/** * Verify that we can parse the ElementSerializer. */ public void testParseElementSerializer_Normal() { // SETUP String auxPrefix = "jcs.auxiliary." + "MYAux"; String testPropertyValue = "This is the value"; String className = MockElementSerializer.class.getName(); Properties props = new Properties(); props.put( auxPrefix + AuxiliaryCacheConfigurator.SERIALIZER_PREFIX, className ); props.put( auxPrefix + AuxiliaryCacheConfigurator.SERIALIZER_PREFIX + AuxiliaryCacheConfigurator.ATTRIBUTE_PREFIX + ".testProperty", testPropertyValue ); // DO WORK MockElementSerializer result = (MockElementSerializer) AuxiliaryCacheConfigurator .parseElementSerializer( props, auxPrefix ); // VERIFY assertNotNull( "Should have a Serializer.", result ); assertEquals( "Property should be set.", testPropertyValue, result.getTestProperty() ); }
/** * Verify that we can parse the event logger. */ public void testParseCacheEventLogger_Normal() { // SETUP String auxPrefix = "jcs.auxiliary." + "MYAux"; String testPropertyValue = "This is the value"; String className = MockCacheEventLogger.class.getName(); Properties props = new Properties(); props.put( auxPrefix + AuxiliaryCacheConfigurator.CACHE_EVENT_LOGGER_PREFIX, className ); props.put( auxPrefix + AuxiliaryCacheConfigurator.CACHE_EVENT_LOGGER_PREFIX + AuxiliaryCacheConfigurator.ATTRIBUTE_PREFIX + ".testProperty", testPropertyValue ); // DO WORK MockCacheEventLogger result = (MockCacheEventLogger) AuxiliaryCacheConfigurator .parseCacheEventLogger( props, auxPrefix ); // VERIFY assertNotNull( "Should have a logger.", result ); assertEquals( "Property should be set.", testPropertyValue, result.getTestProperty() ); }
/** * Verify that we can parse the event logger. */ public void testParseCacheEventLogger_Normal() { // SETUP String auxPrefix = "jcs.auxiliary." + "MYAux"; String testPropertyValue = "This is the value"; String className = MockCacheEventLogger.class.getName(); Properties props = new Properties(); props.put( auxPrefix + AuxiliaryCacheConfigurator.CACHE_EVENT_LOGGER_PREFIX, className ); props.put( auxPrefix + AuxiliaryCacheConfigurator.CACHE_EVENT_LOGGER_PREFIX + AuxiliaryCacheConfigurator.ATTRIBUTE_PREFIX + ".testProperty", testPropertyValue ); // DO WORK MockCacheEventLogger result = (MockCacheEventLogger) AuxiliaryCacheConfigurator .parseCacheEventLogger( props, auxPrefix ); // VERIFY assertNotNull( "Should have a logger.", result ); assertEquals( "Property should be set.", testPropertyValue, result.getTestProperty() ); }
/** * Verify that we can parse the ElementSerializer. */ public void testParseElementSerializer_Normal() { // SETUP String auxPrefix = "jcs.auxiliary." + "MYAux"; String testPropertyValue = "This is the value"; String className = MockElementSerializer.class.getName(); Properties props = new Properties(); props.put( auxPrefix + AuxiliaryCacheConfigurator.SERIALIZER_PREFIX, className ); props.put( auxPrefix + AuxiliaryCacheConfigurator.SERIALIZER_PREFIX + AuxiliaryCacheConfigurator.ATTRIBUTE_PREFIX + ".testProperty", testPropertyValue ); // DO WORK MockElementSerializer result = (MockElementSerializer) AuxiliaryCacheConfigurator .parseElementSerializer( props, auxPrefix ); // VERIFY assertNotNull( "Should have a Serializer.", result ); assertEquals( "Property should be set.", testPropertyValue, result.getTestProperty() ); }