public void InstanceOK() { //create instance of class we want to create clsServiceOrderCollection AllCounties = new clsServiceOrderCollection(); //test to see that it exists Assert.IsNotNull(AllCounties); }
public void CountPropertyOK() { //create instance of class we want to create clsServiceOrderCollection AllOrders = new clsServiceOrderCollection(); //create some test data to assign to the property Int32 SomeCount = 14; //assign data to the property AllOrders.Count = SomeCount; //test to see that the 2 values are same Assert.AreEqual(AllOrders.Count, SomeCount); }
public void CountMatchesList() { //create instance of class we want to create clsServiceOrderCollection Orders = new clsServiceOrderCollection(); //create some test data to assign to the property //in this case the data needs to be list of objects List <clsServiceOrder> TestList = new List <clsServiceOrder>(); //add an item to the list //create the item of test data clsServiceOrder TestItem = new clsServiceOrder(); //set its properties TestItem.OrderNo = 1; TestItem.Service = "Antivirus"; //add item to test list TestList.Add(TestItem); //assign data to property Orders.AllOrders = TestList; //test to see that the 2 values are same Assert.AreEqual(Orders.Count, TestList.Count); }