public void ShouldInsertProductToSql() { ITriggerAfterChangeProduct triigTriggerAfterChangeProduct = Mock.Create <ITriggerAfterChangeProduct>(); Mock.Arrange(() => triigTriggerAfterChangeProduct.SendProduct(Arg.IsAny <ChangeInfo>())).DoNothing(); IProductRepository productRepository = new ProductRepository(); productRepository.InsertProduct(100, "trang", 100); }
public ProductRepository(ITriggerAfterChangeProduct triggerAfterChangeProduct) { }