use of com.thoughtworks.go.server.web.SiteUrlProvider in project gocd by gocd.
the class WebBasedAuthenticationFilterTest method setUp.
@Before
public void setUp() throws Exception {
request = mock(HttpServletRequest.class);
response = mock(HttpServletResponse.class);
filterChain = mock(FilterChain.class);
authorizationExtension = mock(AuthorizationExtension.class);
goConfigService = mock(GoConfigService.class);
siteUrlProvider = mock(SiteUrlProvider.class);
securityConfig = new SecurityConfig();
securityAuthConfig = new SecurityAuthConfig("github", "github.oauth", new ConfigurationProperty());
securityConfig.securityAuthConfigs().add(securityAuthConfig);
stub(goConfigService.security()).toReturn(securityConfig);
filter = new WebBasedAuthenticationFilter(authorizationExtension, goConfigService, siteUrlProvider);
}
Aggregations