"景先生毕设|www.jxszl.com

C# BusinessLogic类代码示例

2023-12-29 17:37编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中BusinessLogic类的典型用法代码示例。如果您正苦于以下问题:C#BusinessLogic类的具体用法?C#BusinessLogic怎么用?C#BusinessLogic使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:SetUp publicvoidSetUp() { products=newList(); companies=newList(); acquisitions=newList(); acquisitionItems=newList(); sales=newList(); saleItems=newList(); stocks=newList(); repository=newMock(); repository.SetUpTable(it=>it.Products,products); repository.SetUpTable(it=>it.Companies,companies); repository.SetUpTable(it=>it.Acquisitions,acquisitions); repository.SetUpTable(it=>it.AcquisitionItems,acquisitionItems); repository.SetUpTable(it=>it.Sales,sales); repository.SetUpTable(it=>it.SaleItems,saleItems); repository.SetUpTable(it=>it.Stocks,stocks); repository .Setup(it=>it.SaveChanges()) .Callback(()=> { acquisitions.ForEach(FixItems); sales.ForEach(FixItems); }); transaction=newMock(); repository .Setup(it=>it.CreateTransaction(It.IsAny())) .Returns(transaction.Object); sut=newBusinessLogic(()=>repository.Object); }
原文链接:http://www.jxszl.com/biancheng/C/556617.html