public void InstanceOK() { //create an instance of the class we want to create clsShoeCollection AllShoe = new clsShoeCollection(); //test to see that it exists Assert.IsNotNull(AllShoe); }
public void CountPropertyOK() { //create an instance of the class we want to create clsShoeCollection AllShoe = new clsShoeCollection(); //create some test data to assign to the property Int32 SomeCount = 2; //assign the data to the property AllShoe.Count = SomeCount; //test to see that the two values are the same Assert.AreEqual(AllShoe.Count, SomeCount); }
public void ThisShoeOK() { //create an instance of the class we want to create clsShoeCollection AllShoe = new clsShoeCollection(); //create some test data to assign to the property clsShoe TestShoe = new clsShoe(); //set the properties of the test object TestItem.Active = true; TestItem.Brand = "some brand"; TestItem.Colour = "some colour"; TestItem.Size = 1; TestItem.Style = "some style"; //assign the data to the property //Test to see that the two values are the same Assert.AreEqual(AllShoe / ShoeList, TestList); }
public void ShoeListOK() { //create an instance of the class we want to create clsShoeCollection AllShoe = new clsShoeCollection(); //create some test data to assign to the property //in this case the data needs to be a list of object List<clsShoe> TestList = new List<clsShoe>(); //add an item to the list //create the item of test data clsShoe TestItem = new clsShoe(); //set its properties TestItem.Active = true; TestItem.Brand = "some brand"; TestItem.Colour = "some colour"; TestItem.Size = 1; TestItem.Style = "some style"; //add the item to the test list TestList.Add(TestItem); //assign the data to the property AllShoe.ShoeList = TestList; //Test to see that the two values are the same Assert.AreEqual(AllShoe / ShoeList, TestList);