Esempio n. 1
0
 public void DeleteProductWillAuditDeletion(int id, [Frozen] Mock <IAuditor> auditorMock, AuditingProductRepository sut)
 {
     // Fixture setup
     // Exercise system
     sut.DeleteProduct(id);
     // Verify outcome
     auditorMock.Verify(a => a.Record(It.Is <AuditEvent>(ae => ae.Name == "ProductDeleted" && ae.Data.Equals(id))));
     // Teardown
 }
Esempio n. 2
0
 public void DeleteProductWillDeleteProductFromDecoratedRepository(int id, [Frozen] Mock <ProductRepository> repositoryMock, AuditingProductRepository sut)
 {
     // Fixture setup
     // Exercise system
     sut.DeleteProduct(id);
     // Verify outcome
     repositoryMock.Verify(r => r.DeleteProduct(id));
     // Teardown
 }