public AuthenticationService(IDataRepository data, TokenService tokens, ISettings settings)
        {
            Requires.NotNull(data, "data");
            Requires.NotNull(tokens, "tokens");
            Requires.NotNull(settings, "settings");

            Data = data;
            Tokens = tokens;
            Settings = settings;
            Timeout = TimeSpan.FromMinutes(30);
        }
            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);
            }
Exemple #3
0
 public UtilWorker(TokenService tokens)
 {
     Tokens = tokens;
 }