public static void AssertTheBaskerIsStoredToDatabase(Basket testBasket, ProductStockLocation stockLocation) { Serilog.Log.Information("Assert the changed ProductStock is saved to the database"); Assert.AreEqual(new Repository <ProductStockLocation>().GetByID(1).Amount, stockLocation.Amount); }
public static void AssertDecreaseOfStock(Basket testBasket, ProductStockLocation stockLocation) { Serilog.Log.Information("Assert reserveProduct decreases stock amount with one"); Assert.IsTrue(curAmount - 1 == stockLocation.Amount); }