public void PostcodePropertyOK()
        {
            clsHotel AHotel   = new clsHotel();         //create an instance of the class we want to create
            string   TestData = "LE1 9BH";              //create some test data to assign to the property

            AHotel.Postcode = TestData;                 //assign the data to the property
            Assert.AreEqual(AHotel.Postcode, TestData); //test to see that two values are the same
        }
        public void RoomCapacityPropertyOK()
        {
            clsHotel AHotel   = new clsHotel();             //create an instance of the class we want to create
            Int32    TestData = 200;                        //create some test data to assign to the property

            AHotel.RoomCapacity = TestData;                 //assign the data to the property
            Assert.AreEqual(AHotel.RoomCapacity, TestData); //test to see that two values are the same
        }
        public void PhoneNoPropertyOK()
        {
            clsHotel AHotel   = new clsHotel();        //create an instance of the class we want to create
            string   TestData = "01162245676";         //create some test data to assign to the property

            AHotel.PhoneNo = TestData;                 //assign the data to the property
            Assert.AreEqual(AHotel.PhoneNo, TestData); //test to see that two values are the same
        }
        public void DateAddedPropertyOK()
        {
            clsHotel AHotel   = new clsHotel();          //create an instance of the class we want to create
            DateTime TestData = DateTime.Now.Date;       //create some test data to assign to the property

            AHotel.DateAdded = TestData;                 //assign the data to the property
            Assert.AreEqual(AHotel.DateAdded, TestData); //test to see that two values are the same
        }
        public void AddressPropertyOK()
        {
            clsHotel AHotel   = new clsHotel();        //create an instance of the class we want to create
            string   TestData = "25 Drinkstone Road";  //create some test data to assign to the property

            AHotel.Address = TestData;                 //assign the data to the property
            Assert.AreEqual(AHotel.Address, TestData); //test to see that two values are the same
        }
        public void FindMethodOK()
        {
            clsHotel AHotel  = new clsHotel(); //create an instance of the class we want to create
            Boolean  Found   = false;          //boolean variable to store the result of the validation
            Int32    HotelID = 5;              //create some test data to use with the method

            Found = AHotel.Find(HotelID);      //invoke the method
            Assert.IsTrue(Found);              //test to see that the result is correct
        }
        public void RoomCapacityMaxLessOne()
        {
            clsHotel AHotel = new clsHotel(); //create an instance of the class we want to create
            Boolean  OK     = false;          //boolean variable to store the result of the validation
            //create some test data to pass the method
            string Name         = "Premier Inn";
            string Address      = "Test Street";
            string PostCode     = "Le1 9BH";
            string PhoneNo      = "07123456789";
            string RoomCapacity = "300";
            string DateAdded    = DateTime.Now.Date.ToString();

            OK = AHotel.Valid(Name, Address, PostCode, PhoneNo, RoomCapacity, DateAdded);
            Assert.IsTrue(OK); //test to see that the result is correct
        }
        public void DateAddedExtremeMax()
        {
            clsHotel AHotel = new clsHotel(); //create an instance of the class we want to create
            Boolean  OK     = false;          //boolean variable to store the result of the validation
            //create some test data to pass the method
            string   Name         = "Premier Inn";
            string   Address      = "Test Street";
            string   PostCode     = "Le1 9BH";
            string   PhoneNo      = "07123456789";
            string   RoomCapacity = "300";
            DateTime TestDate;                 //create a variable to store the test data

            TestDate = DateTime.Now.Date;      //set the date to todaus date
            TestDate = TestDate.AddYears(100); //change current time to 100 years pluss
            string DateAdded = TestDate.ToString();

            //invoke the method
            OK = AHotel.Valid(Name, Address, PostCode, PhoneNo, RoomCapacity, DateAdded);
            Assert.IsFalse(OK); //test to see that the result is correct
        }
        public void InstanceOK()
        {
            clsHotel AHotel = new clsHotel(); //create an instance of the class we want to create

            Assert.IsNotNull(AHotel);         //test to see that it exists
        }