Exemplo n.º 1
0
        public void GetUserTypeNonExisting()
        {
            CtrGetData ctrGetDataObj = new CtrGetData();
            string expected = "User type not found";
            string actual = ctrGetDataObj.GetUserType("*****@*****.**").Trim();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void GetUserTypeStudent()
        {
            CtrGetData ctrGetDataObj = new CtrGetData();
            string expected = "Student";
            string actual = ctrGetDataObj.GetUserType("*****@*****.**").Trim();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void GetNonExistingUserData()
        {
            CtrGetData ctrGetDataObj = new CtrGetData();
            object[] array = new Array[19];
            ctrGetDataObj.GetUserData("*****@*****.**").CopyTo(array, 0);

            Assert.IsNull(array[0]);
        }
Exemplo n.º 4
0
        public void GetUserTypeLandlord()
        {
            CtrGetData ctrGetDataObj = new CtrGetData();
            string expected = "Landlord";
            string actual = ctrGetDataObj.GetUserType("*****@*****.**").Trim();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 5
0
        public void RemoveFromWishList()
        {
            CtrStudent ctrStudentObj = new CtrStudent();
            CtrGetData ctrGetDataObj = new CtrGetData();
            DataSet ds = ctrGetDataObj.GetAllFlats();

            string studentEmail = "*****@*****.**";
            int flatId = (int)ds.Tables[0].Rows[0]["Id"];

            bool actual = ctrStudentObj.RemoveFromWishlist(studentEmail, flatId);
            bool expected = true;

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 6
0
        public void AddToWishListExistingApplicaation()
        {
            CtrStudent ctrStudentObj = new CtrStudent();
            MdlStudent mdlStudentObj = StudentTests.GenerateStudentObj();

            CtrGetData ctrGetDataObj = new CtrGetData();
            DataSet ds = ctrGetDataObj.GetAllFlats();

            MdlApplication mdlApplicationObj = new MdlApplication();
            string studentEmail = "*****@*****.**";
            int flatId = (int)ds.Tables[0].Rows[0]["Id"];
            int score = 100;

            bool actual = ctrStudentObj.AddToWishlist(studentEmail, flatId, score);
            bool expected = false;

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 7
0
 public void GetStudentData()
 {
     CtrGetData ctrGetDataObj = new CtrGetData();
     Assert.IsNotNull(ctrGetDataObj.GetUserData("*****@*****.**"));
 }
Exemplo n.º 8
0
 public void GetLandlordData()
 {
     CtrGetData ctrGetDataObj = new CtrGetData();
     Assert.IsNotNull(ctrGetDataObj.GetUserData("*****@*****.**"));
 }
Exemplo n.º 9
0
 public void GetAllFlats()
 {
     CtrGetData ctrGetDataObj = new CtrGetData();
     DataSet ds = ctrGetDataObj.GetAllFlats();
     Assert.IsNotNull(ds);
 }
Exemplo n.º 10
0
        public string GetUserType(string email)
        {
            ctrGetDataObj = new CtrGetData();

            Console.WriteLine();
            Console.WriteLine("GetUserType() " + GetExecutionThreadTime());

            return ctrGetDataObj.GetUserType(email);
        }
Exemplo n.º 11
0
        public DataSet GetAllFlats()
        {
            ctrGetDataObj = new CtrGetData();

            Console.WriteLine();
            Console.WriteLine("GetAllFlata() " + GetExecutionThreadTime());

            return ctrGetDataObj.GetAllFlats();
        }