public void HotelIDMinusOne() { clsRooms NewRoom = new clsRooms(); //create an instance of the class we want to create Boolean OK = false; //boolean variable to store the result of the validation string HotelID = ""; // this should trigger an error string Inventory = "Blow Dryer"; string RoomType = "Family Bed"; OK = NewRoom.Valid(HotelID, Inventory, RoomType); //invoke the method Assert.IsFalse(OK); }
public void ValidMethodOK() { clsRooms NewRoom = new clsRooms(); //create an instance of the class we want to create Boolean OK = false; //boolean variablw to store the result of the validation string HotelID = "Hilton10AD"; string Inventory = "Blow Dryer"; string RoomType = "Family Bed"; //create some test data to pass to the method OK = NewRoom.Valid(HotelID, Inventory, RoomType); //test to see that the result is correct Assert.IsTrue(OK); //test to see that the result is correct }
public void InventoryMid() { clsRooms NewRoom = new clsRooms(); //create an instance of the class we want to create Boolean OK = false; //boolean variable to store the result of the validation string HotelID = "HLT10AD"; string Inventory = "Iron, Kettle"; // this should be ok string RoomType = "Family Bed"; OK = NewRoom.Valid(HotelID, Inventory, RoomType); //invoke the method Assert.IsTrue(OK); }
public void RoomTypeMinPlusOne() { clsRooms NewRoom = new clsRooms(); //create an instance of the class we want to create Boolean OK = false; //boolean variable to store the result of the validation string RoomType = "Twin B"; // this should be ok string HotelID = "HLT10AD"; string Inventory = "Blow Dryer"; OK = NewRoom.Valid(HotelID, Inventory, RoomType); //invoke the method Assert.IsTrue(OK); }
public void InventoryExtremeMax() { clsRooms NewRoom = new clsRooms(); //create an instance of the class we want to create Boolean OK = false; //boolean variable to store the result of the validation string RoomType = "Family Bed"; string HotelID = "HLT10AD"; string Inventory = ""; Inventory = Inventory.PadRight(500, 'I'); // this should trigger an error OK = NewRoom.Valid(HotelID, Inventory, RoomType); //invoke the method Assert.IsFalse(OK); }
public void RoomTypeMaxPlusOne() { clsRooms NewRoom = new clsRooms(); //create an instance of the class we want to create Boolean OK = false; //boolean variable to store the result of the validation string RoomType = ""; // = "STDN Twin Bed"; // this should trigger and error RoomType = RoomType.PadRight(21, 'H'); string HotelID = "HLT10AD"; string Inventory = "Blow Dryer"; OK = NewRoom.Valid(HotelID, Inventory, RoomType); //invoke the method Assert.IsFalse(OK); }