Ejemplo n.º 1
0
        public async Task DeletePassword_Success()
        {
            //Arrange
            var users             = FakeModelsRepository.GetFakeUsers();
            var passwords         = FakeModelsRepository.GetFakePasswords();
            var dbContextMock     = MockInjectedServices.GetMockDbContext(users, passwords);
            var memoryCacheMock   = MockInjectedServices.GetMockmemoryCache(null);
            var authorizationMock = new Mock <IAuthorizationService>();

            var service           = new WalletService(dbContextMock.Object, memoryCacheMock.Object, authorizationMock.Object);
            var cancellationToken = new CancellationToken();

            //Act
            var result = await service.DeletePassword(new Guid(), new System.Security.Claims.ClaimsPrincipal(), cancellationToken);

            //Assert
            Assert.False(result.Success);
        }