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;
 }
            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;
 }
 public TestableAccountController(AuthenticationService authService, TestAuthTokenService tokenService, UrlService urlService)
     : base(authService, tokenService, urlService)
 {
     TestTokenService = tokenService;
 }
示例#7
0
 public SessionsController(AuthenticationService auth)
 {
     Auth = auth;
 }