public void DeleteAttachments_ByIds_Should_DeleteAttachments() { // ARRANGE _mockAttachmentRepository.Setup(x => x.IsAttachmentAllowedToDelete(It.IsAny <string>(), It.IsAny <Uri>(), It.IsAny <Uri>(), It.IsAny <Uri>())) .Returns(true); // ACT ICollection <dynamic> ids = new List <dynamic> { "http://00000000-0000-0000-0000-000000000001/meh", "http://00000000-0000-0000-0000-000000000002/meh", "http://00000000-0000-0000-0000-000000000003/meh" }; _service.DeleteAttachments(ids); // ASSERT _mockAwsS3Service.Verify(x => x.DeleteFileAsync(It.IsAny <string>(), It.IsAny <string>()), Times.Exactly(3)); _mockAttachmentRepository.Verify(x => x.DeleteEntity(It.IsAny <string>(), It.IsAny <Uri>()), Times.Exactly(6)); }