コード例 #1
0
 public void ComputeNumberOfProducts_Should_Correctly_Integrate_With_ProductRepository()
 {
     // Arrange
     _statisticGenerator = new StorageStatisticsGenerator(new ProductRepository());
     // Act
     _statisticGenerator.ComputeNumberOfProducts();
     // Assert
     _productRepository.Verify(p => p.LoadProducts());
 }
コード例 #2
0
 public void Setup()
 {
     _productRepository  = new Mock <IProductRepository>();
     _statisticGenerator = new StorageStatisticsGenerator(_productRepository.Object);
 }