01: package org.acegisecurity.config;
02:
03: import junit.framework.TestCase;
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: //TODO: fix test name
11: public class RememberMeBeanDefinitionParserTest extends TestCase {
12:
13: public void testParserDefaults() {
14: ApplicationContext context = new ClassPathXmlApplicationContext(
15: "org/acegisecurity/config/remember-me-defaults.xml");
16: ProviderManager mgr = (ProviderManager) context
17: .getBean("authenticationManager");
18: assertEquals(1, mgr.getProviders().size());
19: assertTrue(mgr.getProviders().get(0) instanceof DaoAuthenticationProvider);
20: }
21: }
|