protected void Page_Load(object sender, EventArgs e)
        {
            String manager = (String) Session["username"];

            FindVacanciesByManager find = new FindVacanciesByManager();
            List<VacancyDTO> vacancyList =  find.getVacanciesByManager(manager);

            rptShortlistedSelect.DataSource = vacancyList;
            rptShortlistedSelect.DataBind();
        }
        public void getVacanciesByManagerTest()
        {
            FindVacanciesByManager target = new FindVacanciesByManager();

            VacancyDAO vac_context = new VacancyDAO();
            VacancyDTO vac = new VacancyDTO();
            vac.department = "IS";
            vac.description = "Web services";
            vac.manager = "Tom";
            vac.recruiter = "Thumi";
            vac.site = "www.petrosa.co.za";
            vac.startDate = new DateTime(2012, 10, 10);
            vac.endDate = new DateTime(2012, 12, 15);
            vac.description = "desktop support";
            vac.title = "support technician";
            vac.vacancyNumber = "1";
            vac.viewCount = 10;
            vac.viewStatus = "published";
            vac.status = "active";

            vac_context.presist(vac);

            bool expected = true;
            bool actual;
            actual = vac_context.isFound("1");
            Assert.AreEqual(expected, actual);

            VacancyDTO vacTwo = new VacancyDTO();
            vacTwo.department = "Business";
            vacTwo.description = "Money";
            vacTwo.manager = "Marc";
            vacTwo.recruiter = "Mandy";
            vacTwo.site = "Durban";
            vacTwo.startDate = new DateTime(2012, 1, 10);
            vacTwo.endDate = new DateTime(2012, 3, 15);
            vacTwo.description = "desktop support";
            vacTwo.title = "support technician";
            vacTwo.vacancyNumber = "2";
            vacTwo.viewCount = 10;
            vacTwo.viewStatus = "published";
            vacTwo.status = "active";

            vac_context.presist(vacTwo);

            bool expected2 = true;
            bool actual2;
            actual2 = vac_context.isFound("2");
            Assert.AreEqual(expected2, actual2);

            VacancyDTO vacThree = new VacancyDTO();
            vacThree.department = "IS";
            vacThree.description = "Money";
            vacThree.manager = "Tom";
            vacThree.recruiter = "Fuji";
            vacThree.site = "Durban";
            vacThree.startDate = new DateTime(2012, 11, 10);
            vacThree.endDate = new DateTime(2012, 12, 20);
            vacThree.description = "App Specialist";
            vacThree.title = "Developer";
            vacThree.vacancyNumber = "3";
            vacThree.viewCount = 10;
            vacThree.viewStatus = "published";
            vacThree.status = "active";

            vac_context.presist(vacThree);

            bool expected3 = true;
            bool actual3;
            actual3 = vac_context.isFound("3");
            Assert.AreEqual(expected3, actual3);

            FindVacanciesByManager manager = new FindVacanciesByManager();

            List<VacancyDTO> listVacs =  manager.getVacanciesByManager("Tom");

            foreach (VacancyDTO v in listVacs)
            {
                string vacNo = v.vacancyNumber.ToString();
                Assert.IsNotNull(vacNo);

            }

            vac_context.removeByUserId("1");
            vac_context.removeByUserId("2");
            vac_context.removeByUserId("3");
        }