Exemplo n.º 1
0
        public async Task DeleteConfirmed_ReturnsRedirectToActionResult_WhenTodoItemIsDeleted()
        {
            this._todoItemServiceMock
            .Setup(service => service.DeleteTodoAsync(It.IsAny <Guid>(), It.IsAny <ApplicationUser>()))
            .ReturnsAsync(true);

            this._fileItemServiceMock
            .Setup(service => service.DeleteFileAsync(It.IsAny <string>(), It.IsAny <string>()))
            .ReturnsAsync(true);

            var result = await _todosController.DeleteConfirmed(Guid.NewGuid(), "");

            Assert.IsType <RedirectToActionResult>(result);
        }