protected void Page_Load(object sender, EventArgs e)
        {
            String username = (String)Session["username"];
            ApplicationSearchService appService = new ApplicationSearchServiceImpl();
            List<ApplicationDTO> applicationList = appService.getApplicationByUsername(username);

            rpt.DataSource = applicationList;
            rpt.DataBind();
        }
        public void applicationSearchServiceTest()
        {
            ApplicationSearchService target = new ApplicationSearchServiceImpl(); // TODO: Initialize to an appropriate value

            AccountDAO account_context = new AccountDAO();
            ApplicationDAO app_context = new ApplicationDAO();
            VacancyDAO vac_context = new VacancyDAO();

            /*Insert*/
            AccountDTO account = new AccountDTO();
            account.userName = "******";
            account.status = "active";
            account.password = "******";
            account.accountType = "admin";
            account_context.presist(account);

            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, 1);
            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 expectedVac = true;
            bool actualVac;
            actualVac = vac_context.isFound("1");
            Assert.AreEqual(expectedVac, actualVac);

            ApplicationDTO application = new ApplicationDTO();
            application.userName = "******";
            application.vacancyNumber = "1";
            application.status = "open";
            app_context.presist(application);

            //Test getApplicationByUsername method
            List<ApplicationDTO> applicationTestListObj = target.getApplicationByUsername("graddy");
            Assert.AreEqual(application.status, applicationTestListObj[0].status);

            //Test getApplicationByStatus method
            List<ApplicationDTO> applicationTestListObj2 = target.getApplicationByStatus("open");
            Assert.AreEqual(application.status, applicationTestListObj2[0].status);

            //Test getApplicationByVacancyNumber method
            List<ApplicationDTO> applicationTestListObj3 = target.getApplicationByVacancyNumber("1");
            Assert.AreEqual(application.status, applicationTestListObj3[0].status);

            /*Delete*/
            /*
            account_context.removeByUserId("graddy");
            bool expectedDelete = false;
            bool actualDelete = account_context.isFound("graddy");
            Assert.AreEqual(expectedDelete, actualDelete);
            */
        }