public void ShipDepartedTest() { BankDBLogic target = new BankDBLogic(); int traderID = 1; int commodID = 5; int shippingCoID = 6; int departPortID = 2; int destPortID = 3; int quantity = 10; decimal amount = 10; DateTime time = DateTime.Now; int transID = target.InsertCommodityTransaction(traderID, commodID, departPortID, quantity, amount); target.ShipDeparted(shippingCoID, new MovingMsg(departPortID, destPortID, transID, time)); //check CommodityTransport var dataset = conn.FilledDataSet("SELECT ShippingCompanyID, CommodityTransactionID, DepartureTime FROM CommodityTransport"); object[] expectedRow = { 6, transID, time }; Assert.AreEqual(1, dataset.Tables[0].Rows.Count); AssertSeqEqual(expectedRow, dataset.Tables[0].Rows[0].ItemArray); //xxx check CommodityTransaction updated dataset = conn.FilledDataSet("SELECT ID, SalePortID FROM CommodityTransaction"); object[] expectedTransportRow = { transID, destPortID }; Assert.AreEqual(1, dataset.Tables[0].Rows.Count); AssertSeqEqual(expectedTransportRow, dataset.Tables[0].Rows[0].ItemArray); }
public void ShipArrivedTest() { BankDBLogic target = new BankDBLogic(); //target.ShipArrived(companyID, msg); Assert.Inconclusive("A method that does not return a value cannot be verified."); }