public void Setup() { _db = SingletonTestSetup.Instance().Get(); repo = new Repo(_db); powderInfo = new StaticPowderInfo { StaticPowderInfoId = Guid.NewGuid(), EndlasDescription = "TestPowder", Density = 1f, }; _db.StaticPowderInfo.Add(powderInfo); _db.SaveChanges(); vendor = new Vendor { VendorId = Guid.NewGuid(), VendorName = "Name", PointOfContact = "POC", VendorAddress = "Address", VendorPhone = "Phone" }; _db.Vendors.Add(vendor); _db.SaveChanges(); powderOrderGood = new PowderOrder { PowderOrderId = Guid.NewGuid(), PurchaseOrderDate = DateTime.Now, PurchaseOrderNum = "", ShippingCost = 0.0f, TaxCost = 0.0f, Vendor = vendor, VendorId = vendor.VendorId, }; _db.PowderOrders.Add(powderOrderGood); powderOrderBad = new PowderOrder { PowderOrderId = Guid.NewGuid(), PurchaseOrderDate = DateTime.Now, PurchaseOrderNum = "", ShippingCost = 0.0f, TaxCost = 0.0f, Vendor = vendor, VendorId = vendor.VendorId, }; _db.PowderOrders.Add(powderOrderBad); _db.SaveChanges(); }
public void Setup() { _db = SingletonTestSetup.Instance().Get(); }