public void ThisOrderPropertyOK() { ClassLibrary.clsOrdersCollection AllOrders = new ClassLibrary.clsOrdersCollection(); clsOrder TestOrder = new clsOrder(); TestOrder.Dispatched = true; TestOrder.ProductName = "kenny"; TestOrder.ProductNo = 1; TestOrder.Date = DateTime.Now.Date; TestOrder.Price = 84.0000; TestOrder.OrderNo = 1; AllOrders.ThisOrder = TestOrder; Assert.AreEqual(AllOrders.ThisOrder, TestOrder); }
public void ListAndCountOK() { ClassLibrary.clsOrdersCollection AllOrders = new ClassLibrary.clsOrdersCollection(); List <clsOrder> TestList = new List <clsOrder>(); clsOrder TestItem = new clsOrder(); TestItem.Dispatched = true; TestItem.ProductName = "kenny"; TestItem.ProductNo = 1; TestItem.Date = DateTime.Now.Date; TestItem.Price = 84.0000; TestItem.OrderNo = 1; TestList.Add(TestItem); AllOrders.OrderList = TestList; Assert.AreEqual(AllOrders.Count, TestList.Count); }
public void TwoRecordsPresent() { //create an instance of the class we want to create ClassLibrary.clsOrdersCollection AllOrders = new ClassLibrary.clsOrdersCollection(); Assert.AreEqual(AllOrders.Count, 2); }