Search in sources :

Example 11 with ReportParameters

use of org.opennms.api.reporting.parameter.ReportParameters in project opennms by OpenNMS.

the class JasperReportServiceTest method testStringInputType.

@Test
public void testStringInputType() throws ReportException {
    ReportParameters reportParameters = m_reportService.getParameters(REPORTID);
    ReportStringParm stringParm2 = reportParameters.getStringParms().get(1);
    Assert.assertEquals("onmsCategorySelector", stringParm2.getInputType());
}
Also used : ReportParameters(org.opennms.api.reporting.parameter.ReportParameters) ReportStringParm(org.opennms.api.reporting.parameter.ReportStringParm) Test(org.junit.Test)

Example 12 with ReportParameters

use of org.opennms.api.reporting.parameter.ReportParameters in project opennms by OpenNMS.

the class JasperReportServiceGetParametersTest method readPropertiesOfJasperResourceInputStreamURITest.

@Test
public void readPropertiesOfJasperResourceInputStreamURITest() throws ReportException {
    String id = "REMOTE_jasper-resource-inputstream-uri-test";
    assertNotNull(service.getParameters(id));
    ReportParameters params = service.getParameters(id);
    assertEquals(7, params.getReportParms().size());
}
Also used : ReportParameters(org.opennms.api.reporting.parameter.ReportParameters) Test(org.junit.Test)

Example 13 with ReportParameters

use of org.opennms.api.reporting.parameter.ReportParameters in project opennms by OpenNMS.

the class JasperReportServiceGetParametersTest method readPropertiesOfTrivialTestReportTest.

@Test
public void readPropertiesOfTrivialTestReportTest() throws ReportException {
    String id = "trivial-report";
    assertNotNull(service.getParameters(id));
    ReportParameters params = service.getParameters(id);
    assertEquals(0, params.getReportParms().size());
}
Also used : ReportParameters(org.opennms.api.reporting.parameter.ReportParameters) Test(org.junit.Test)

Example 14 with ReportParameters

use of org.opennms.api.reporting.parameter.ReportParameters in project opennms by OpenNMS.

the class JasperReportServiceGetParametersTest method readPropertiesOfJasperUriTest.

@Test
public void readPropertiesOfJasperUriTest() throws ReportException {
    String id = "REMOTE_jasper-uri-test";
    assertNotNull(service.getParameters(id));
    ReportParameters params = service.getParameters(id);
    assertEquals(1, params.getReportParms().size());
}
Also used : ReportParameters(org.opennms.api.reporting.parameter.ReportParameters) Test(org.junit.Test)

Aggregations

ReportParameters (org.opennms.api.reporting.parameter.ReportParameters)14 Test (org.junit.Test)12 ReportStringParm (org.opennms.api.reporting.parameter.ReportStringParm)4 Calendar (java.util.Calendar)3 Date (java.util.Date)2 ReportDateParm (org.opennms.api.reporting.parameter.ReportDateParm)2 ReportIntParm (org.opennms.api.reporting.parameter.ReportIntParm)2 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 BeforeClass (org.junit.BeforeClass)1 ReportDoubleParm (org.opennms.api.reporting.parameter.ReportDoubleParm)1 ReportFloatParm (org.opennms.api.reporting.parameter.ReportFloatParm)1 DefaultTime (org.opennms.netmgt.config.reporting.DefaultTime)1 Parameters (org.opennms.netmgt.config.reporting.Parameters)1 ParameterConversionService (org.opennms.reporting.core.svclayer.ParameterConversionService)1