@Test public void dgetauthorizedSchoolDatas() { SchoolI sc = new SchoolE(); sc.getAuthenticationToken().setUserName("user1"); sc.setTimezone("2"); sc.setSchoolName("SOUTHFIELD SENIOR HIGH SCHOOL"); /*sc.setSubRegionalOffice("12"); sc.setSchoolName("Binghamton High School");*/ schoolService = TestUtils.getSchoolServiceContext(); Result r = schoolService.getSchools(sc); requestId = new StringBuilder((String) r.getResult()); LOG.trace("data Request--" + requestId); assertNotNull(requestId); LOG.trace("Checking testcase for status"); statusService = TestUtils.getStatusServiceContext(); boolean status = getStatus(requestId.toString(), sc); Result res = schoolService.getSchoolsDataForMDB(sc); ; List<SchoolI> schoolsData = (List<SchoolI>) res.getResult(); /*List<SchoolDTO> schoolsData = schoolService.getSchoolsData(requestId, sc); LOG.trace("Size : " + schoolsData.size()); assertTrue("Ivalid Data", schoolsData.size() >= 1);*/ }
@Test public void cgetSchoolsData() { LOG.trace("Inside cgetSchoolsData"); schoolService = TestUtils.getSchoolServiceContext(); SchoolI sc = new SchoolE(); // sc.setUserName("user2"); sc.getAuthenticationToken().setRequestId(requestId.toString()); sc.getAuthenticationToken().setUserName(userName); LOG.trace("task ID in cgetSchoolsData--" + requestId); Result r = schoolService.getSchoolsDataForMDB(sc); List<SchoolI> schoolsData = (List<SchoolI>) r.getResult(); LOG.trace("Size : " + schoolsData.size()); assertTrue("Ivalid Data", schoolsData.size() >= 1); }