예제 #1
0
파일: FlatTestes.cs 프로젝트: Teo27/Eflats
        public void GetAllFlats()
        {
            CtrGetData ctrGetDataObj = new CtrGetData();
            DataSet    ds            = ctrGetDataObj.GetAllFlats();

            Assert.IsNotNull(ds);
        }
예제 #2
0
        public DataSet GetAllFlats()
        {
            ctrGetDataObj = new CtrGetData();

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

            return(ctrGetDataObj.GetAllFlats());
        }
예제 #3
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);
        }
예제 #4
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);
        }