public void InitializesValues() { // Arrange var data = new MockDataRepository(); var tokens = new TokenService(); var settings = new MockSettings(); // Act AuthenticationService auth = new AuthenticationService(data, tokens, settings); // Assert Assert.Same(data, auth.Data); Assert.Same(tokens, auth.Tokens); Assert.Same(settings, auth.Settings); Assert.Equal(TimeSpan.FromMinutes(30), auth.Timeout); }
public ReviewsController(DiffService diff, AuthenticationService auth, ReviewService reviews) { Diff = diff; Reviews = reviews; Auth = auth; }
public void InitializesValues() { // Arrange var data = new MockDataRepository(); var auths = new List<Authenticator>() { new FacebookAuthenticator() }; var settings = new MockSettings(); // Act AuthenticationService auth = new AuthenticationService(auths, settings, data); // Assert Assert.Same(data, auth.Data); Assert.Equal(1, auth.Authenticators.Count); Assert.Same(auths[0], auth.Authenticators["fb"]); Assert.Same(settings, auth.Settings); }
public SessionsController(AuthenticationService auth) { Requires.NotNull(auth, "auth"); Auth = auth; }
public ChangesController(ReviewService reviews, AuthenticationService auth, DiffService diff) { Reviews = reviews; Auth = auth; Diff = diff; }
public TestableAccountController(AuthenticationService authService, TestAuthTokenService tokenService, UrlService urlService) : base(authService, tokenService, urlService) { TestTokenService = tokenService; }
public SessionsController(AuthenticationService auth) { Auth = auth; }