1 17 18 package org.apache.avalon.fortress.impl.role.test; 19 20 import org.apache.avalon.fortress.impl.role.FortressRoleManager; 21 import org.apache.avalon.framework.logger.ConsoleLogger; 22 23 32 public class FortressRoleManagerTestCase 33 extends AbstractRoleManagerTestCase 34 { 35 public FortressRoleManagerTestCase( String name ) 36 { 37 super( name ); 38 } 39 40 41 public void testTest() {} 42 43 47 public void DONTtestShorthandReturnValues() 48 throws Exception 49 { 50 FortressRoleManager roles = new FortressRoleManager( null, this.getClass().getClassLoader() ); 51 roles.enableLogging( new ConsoleLogger( ConsoleLogger.LEVEL_INFO ) ); 52 roles.initialize(); 53 54 checkRole( roles, 55 "jdbc-datasource", 56 "org.apache.avalon.excalibur.datasource.DataSourceComponent", 57 "org.apache.avalon.excalibur.datasource.JdbcDataSource", 58 "org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler" ); 59 checkRole( roles, 60 "j2ee-datasource", 61 "org.apache.avalon.excalibur.datasource.DataSourceComponent", 62 "org.apache.avalon.excalibur.datasource.J2eeDataSource", 63 "org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler" ); 64 if ( isInformixClassExists() ) 65 { 66 checkRole( roles, 67 "informix-datasource", 68 "org.apache.avalon.excalibur.datasource.DataSourceComponent", 69 "org.apache.avalon.excalibur.datasource.InformixDataSource", 70 "org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler" ); 71 } 72 checkRole( roles, 73 "monitor", 74 "org.apache.avalon.excalibur.monitor.Monitor", 75 "org.apache.avalon.excalibur.monitor.ActiveMonitor", 76 "org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler" ); 77 checkRole( roles, 78 "passive-monitor", 79 "org.apache.avalon.excalibur.monitor.Monitor", 80 "org.apache.avalon.excalibur.monitor.PassiveMonitor", 81 "org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler" ); 82 checkRole( roles, 83 "xalan-xpath", 84 "org.apache.excalibur.xml.xpath.XPathProcessor", 85 "org.apache.excalibur.xml.xpath.XPathProcessorImpl", 86 "org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler" ); 87 checkRole( roles, 88 "jaxpath", 89 "org.apache.excalibur.xml.xpath.XPathProcessor", 90 "org.apache.excalibur.xml.xpath.JaxenProcessorImpl", 91 "org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler" ); 92 checkRole( roles, 93 "resolver", 94 "org.apache.excalibur.source.SourceResolver", 95 "org.apache.excalibur.source.impl.SourceResolverImpl", 96 "org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler" ); 97 checkRole( roles, 98 "parser", 99 "org.apache.excalibur.xml.dom.DOMParser", 100 "org.apache.excalibur.xml.impl.JaxpParser", 101 "org.apache.avalon.fortress.impl.handler.PerThreadComponentHandler" ); 102 checkRole( roles, 103 "xerces-parser", 104 "org.apache.excalibur.xml.dom.DOMParser", 105 "org.apache.excalibur.xml.impl.XercesParser", 106 "org.apache.avalon.fortress.impl.handler.FactoryComponentHandler" ); 107 } 108 109 } 110 111 | Popular Tags |