Esempio n. 1
0
        public void ValidMethodOK()
        {
            //create an instance of the class we want to create
            clsRoomType ARoomtype = new clsRoomType();
            //string variable to store the error message
            String Error = "";

            //invoke method
            Error = ARoomtype.Valid(RoomtypeFloorNo, RoomtypeSize, Roomtype, Datetime);
            //test to see that the result is correct
            Assert.AreEqual(Error, "");
        }
Esempio n. 2
0
        public void RoomtypeMid()
        {
            //create an instance of the class we want to create
            clsRoomType ARoomtype = new clsRoomType();
            //string variable to store any error message
            String Error = "";
            //create some test data to pass to the method
            string Roomtype = "aaa";

            //invoke the method
            Error = ARoomtype.Valid(RoomtypeFloorNo, RoomtypeSize, Roomtype, Datetime);
            //test to see that the result is correct
            Assert.AreNotEqual(Error, "");
        }
Esempio n. 3
0
        public void DateTimeExtremeMin()
        {
            //create an instance of the class we want to create
            clsRoomType ARoomtype = new clsRoomType();
            //string variable to store any error message
            String Error = "";
            //create variable to store test data
            DateTime TestDate;

            //set the data to todays date
            TestDate = DateTime.Now.Date;
            //change the date to whatver is the date ess 100 years
            TestDate = TestDate.AddYears(-100);
            //convert the data variable to a string variable
            string Datetime = TestDate.ToString();

            //invoke the method
            Error = ARoomtype.Valid(RoomtypeFloorNo, RoomtypeSize, Roomtype, Datetime);
            //
            //test to see that the result is correct
            Assert.AreNotEqual(Error, "");
        }