public void ReportByRoomTypeTestDataFound() { //create an instance of the filtered data clsRoomtypeCollection FilteredRoomtype = new clsRoomtypeCollection(); //var to store outcome Boolean OK = true; //apply a roomtype that doesnt exist FilteredRoomtype.ReportByRoomtype("Standard"); //check that the correct nuber of recrods are found if (FilteredRoomtype.Count == 2) { //checl that the first recrod is ID 1 if (FilteredRoomtype.RoomtypeList[0].RoomtypeID != 81) { OK = false; } //check that the first ID is 2 if (FilteredRoomtype.RoomtypeList[1].RoomtypeID != 82) { OK = false; } else { OK = false; } // test to see that there are no recrods } Assert.IsTrue(OK); }
public void ReportByRoomtypeMethodOK() { //Create instance of the class we want to create clsRoomtypeCollection Allrooms = new clsRoomtypeCollection(); //create an instance of te filtred data clsRoomtypeCollection FilteredRooms = new clsRoomtypeCollection(); //apply a blank string (should return all records) FilteredRooms.ReportByRoomtype(""); //test to see that the two value are the same Assert.AreNotEqual(Allrooms.Count, FilteredRooms.Count); }