01: /**
02: *
03: */package org.acegisecurity.config;
04:
05: import org.acegisecurity.providers.ProviderManager;
06: import org.acegisecurity.providers.dao.DaoAuthenticationProvider;
07: import org.springframework.context.ApplicationContext;
08: import org.springframework.context.support.ClassPathXmlApplicationContext;
09:
10: import junit.framework.TestCase;
11:
12: /**
13: * @author vpuri
14: *
15: */
16: public class AuthenticationMechanismNamespaceTests extends TestCase {
17: public void testParserDefaults() {
18: ApplicationContext context = new ClassPathXmlApplicationContext(
19: "org/acegisecurity/config/remember-me-defaults.xml");
20: ProviderManager mgr = (ProviderManager) context
21: .getBean("authenticationManager");
22: assertEquals(1, mgr.getProviders().size());
23: assertTrue(mgr.getProviders().get(0) instanceof DaoAuthenticationProvider);
24: }
25: }
|