Package org.opentides.service.impl

Examples of org.opentides.service.impl.ReportServiceImpl


  @Test
  public void testGetParameterValues() {
    String reportFile = "/resources/jasper/test.jrxml"
    InputStream jrXml = ReportServiceTest.class.getResourceAsStream(reportFile);
    ReportServiceImpl service = new ReportServiceImpl();
    Map<String, String[]> inputParam = new HashMap<String, String[]>();
    inputParam.put("raffleId", new String[] {"24"});
    inputParam.put("branch", new String[] {"Cebu"});
    inputParam.put("reportDate", new String[] {"12 Aug 1995"});
    Map<String, Object> reportParam = service.getParameterValues(inputParam, jrXml);
    Assert.assertEquals(new Long(24), reportParam.get("raffleId"));
    Assert.assertEquals("Cebu", reportParam.get("branch"));
    Assert.assertEquals(new Date("12 Aug 1995"), reportParam.get("reportDate"));
  }
View Full Code Here


  @Test
  public void testGetMissingParameters() {
    String reportFile = "/resources/jasper/test.jrxml"
    InputStream jrXml = ReportServiceTest.class.getResourceAsStream(reportFile);
    ReportServiceImpl service = new ReportServiceImpl();
    Map<String, String[]> inputParam = new HashMap<String, String[]>();
    List<ReportDefinition> reportParam =
      service.getMissingParameters(inputParam, jrXml);
    Assert.assertEquals(5, reportParam.size());
//    Assert.assertTrue(reportParam.containsKey("raffleId"));
//    Assert.assertTrue(reportParam.containsKey("branch"));
//    Assert.assertTrue(reportParam.containsKey("imageStream"));
//    Assert.assertTrue(reportParam.containsKey("reportDate"));
View Full Code Here

TOP

Related Classes of org.opentides.service.impl.ReportServiceImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.