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);
            }
Пример #2
0
 public ReviewsController(DiffService diff, AuthenticationService auth, ReviewService reviews)
 {
     Diff = diff;
     Reviews = reviews;
     Auth = auth;
 }
Пример #3
0
            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);
            }
Пример #4
0
 public SessionsController(AuthenticationService auth)
 {
     Requires.NotNull(auth, "auth");
     Auth = auth;
 }
Пример #5
0
 public ChangesController(ReviewService reviews, AuthenticationService auth, DiffService diff)
 {
     Reviews = reviews;
     Auth = auth;
     Diff = diff;
 }
Пример #6
0
 public TestableAccountController(AuthenticationService authService, TestAuthTokenService tokenService, UrlService urlService)
     : base(authService, tokenService, urlService)
 {
     TestTokenService = tokenService;
 }
Пример #7
0
 public SessionsController(AuthenticationService auth)
 {
     Auth = auth;
 }