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;
 }