public async Task GivenDeleteBulkAsyncWhenDataExistThenDeletesData() { // Arrange mockVideoService .Setup(_ => _.DeleteBulkAsync(It.IsAny <ICollection <Guid> >())) .Returns(Task.CompletedTask) .Verifiable(); // Act var result = await videoController.DeleteBulkAsync(It.IsAny <ICollection <Guid> >()); // Assert mockVideoService.VerifyAll(); result.Should().NotBeNull().And.BeOfType <NoContentResult>(); (result as NoContentResult).StatusCode.Should().Be((int)HttpStatusCode.NoContent); }
public async Task GivenDeleteBulkAsyncWhenDataExistThenDeletesData() { // Arrange mockVideoService .Setup(_ => _.DeleteBulkAsync(It.IsAny <ICollection <Guid> >())) .Returns(Task.CompletedTask) .Verifiable(); // Act var result = await videoController.DeleteBulkAsync(It.IsAny <ICollection <Guid> >()); // Assert mockVideoService.VerifyAll(); Assert.That(result, Is.InstanceOf <NoContentResult>()); Assert.That((result as NoContentResult).StatusCode, Is.EqualTo((int)HttpStatusCode.NoContent)); }