@Test public void testStartupFailsIfNoVistaUserDetailsService() throws Exception { VistaAuthenticationProvider provider = new VistaAuthenticationProvider(); try { provider.afterPropertiesSet(); fail("Should have thrown IllegalArgumentException"); } catch (IllegalArgumentException expected) { assertTrue(true); } }
public void afterPropertiesSet() throws Exception { Assert.notNull(this.userCache, "A user cache must be set"); Assert.notNull(this.messages, "A message source must be set"); Assert.notNull(this.userDetailsService, "A VistaUserDetailsService must be set"); }
VistaAuthenticationProvider implements AuthenticationProvider, MessageSourceAware, InitializingBean { public void afterPropertiesSet() throws Exception { Assert.notNull(this.userCache, "A user cache must be set"); Assert.notNull(this.messages, "A message source must be set"); Assert.notNull(this.userDetailsService, "A VistaUserDetailsService must be set"); } }
VistaAuthenticationProvider implements AuthenticationProvider, MessageSourceAware, InitializingBean { public void afterPropertiesSet() throws Exception { Assert.notNull(this.userCache, "A user cache must be set"); Assert.notNull(this.messages, "A message source must be set"); Assert.notNull(this.userDetailsService, "A VistaUserDetailsService must be set"); }  }
VistaAuthenticationProvider implements AuthenticationProvider, MessageSourceAware, InitializingBean { public void afterPropertiesSet() throws Exception { Assert.notNull(this.userCache, "A user cache must be set"); Assert.notNull(this.messages, "A message source must be set"); Assert.notNull(this.userDetailsService, "A VistaUserDetailsService must be set"); }  void afterPropertiesSet(); Authentication authenticate(Authentication authentication); void setMessageSource(MessageSource messageSource); void setUserCache(UserCache userCache); boolean supports(Class authentication); VistaUserDetailsService getUserDetailsService(); @Required void setUserDetailsService(VistaUserDetailsService userDetailsService); UserCache getUserCache(); }
VistaAuthenticationProvider implements AuthenticationProvider, MessageSourceAware, InitializingBean { public void afterPropertiesSet() throws Exception { Assert.notNull(this.userCache, "A user cache must be set"); Assert.notNull(this.messages, "A message source must be set"); Assert.notNull(this.userDetailsService, "A VistaUserDetailsService must be set"); }  void afterPropertiesSet(); Authentication authenticate(Authentication authentication); void setMessageSource(MessageSource messageSource); void setUserCache(UserCache userCache); boolean supports(Class authentication); VistaUserDetailsService getUserDetailsService(); @Required void setUserDetailsService(VistaUserDetailsService userDetailsService); UserCache getUserCache();  }