Пример #1
0
        public async Task DeleteAsync_AppointmentIsDeleted_ReturnsNoContent()
        {
            // Arrange
            var appointment = _fixture.Create <Appointment>();
            int id          = 10;

            _appointmentService
            .Setup(a => a.DeleteAppointmentAsync(id))
            .ReturnsAsync(appointment);

            // Act
            var actual = await _appointmentsController.DeleteAsync(id);

            // Assert
            _appointmentService.Verify(a => a.DeleteAppointmentAsync(id), Times.Once);
            Assert.IsType <NoContentResult>(actual);
        }