コード例 #1
0
        public TokenService(ILocalTokenService localTokenService, IHttpService httpService)
        {
            this.localTokenService = localTokenService
                                     ?? throw new ArgumentNullException(nameof(localTokenService));

            this.httpService = httpService
                               ?? throw new ArgumentNullException(nameof(httpService));
        }
コード例 #2
0
 public LocalTokenServiceTest(ILogger logger, ILocalTokenService localTokenService, ITokenService tokenService,
                              ILocalAccountService localAccountService)
 {
     _logger              = logger;
     _localTokenService   = localTokenService;
     _tokenService        = tokenService;
     _localAccountService = localAccountService;
 }
コード例 #3
0
        public void CheckConstructorWithParameters_CheckNullableLocalTokenService_ShouldThrowException()
        {
            // Arrange
            ILocalTokenService localTokenService = null;

            // Assert
            Assert.Throws <ArgumentNullException>(() => new TokenService(localTokenService, httpServiceMock.Object));
        }
コード例 #4
0
        public void CheckConstructorWithParameters_CheckNullableLocalTokenService_ShouldThrowException()
        {
            // Arrange
            ILocalTokenService localTokenService = null;

            // Assert
            Assert.Throws <ArgumentNullException>(
                () => new TicketsViewModel(null, localTokenService, dialogServiceMock.Object, ticketsServiceMock.Object, tokenServiceMock.Object));
        }
コード例 #5
0
        public void CheckConstructorWithParameters_CheckNullableLocalTokenService_ShouldThrowException()
        {
            // Arrange
            ILocalTokenService localTokenService = null;

            // Assert
            Assert.Throws <ArgumentNullException>(() => new ConfirmEmailViewModel(emailActivationServiceMock.Object, null, localTokenService,
                                                                                  dialogServiceMock.Object, tokenServiceMock.Object, userServiceMock.Object));
        }