Beispiel #1
0
 public void InsertProductWillAuditInsertion(Product product, [Frozen] Mock <IAuditor> auditorMock, AuditingProductRepository sut)
 {
     // Fixture setup
     // Exercise system
     sut.InsertProduct(product);
     // Verify outcome
     auditorMock.Verify(a => a.Record(It.Is <AuditEvent>(ae => ae.Name == "ProductInserted" && ae.Data.Equals(product))));
     // Teardown
 }
Beispiel #2
0
 public void InsertProductWillInsertProductInDecoratedRepository(Product product, [Frozen] Mock <ProductRepository> repositoryMock, AuditingProductRepository sut)
 {
     // Fixture setup
     // Exercise system
     sut.InsertProduct(product);
     // Verify outcome
     repositoryMock.Verify(r => r.InsertProduct(product));
     // Teardown
 }