Package org.candlepin.gutterball.report

Examples of org.candlepin.gutterball.report.Report


        assertEquals(2, reports.size());
    }

    @Test
    public void testGetReportDetails() {
        Report r = reportsResource.getReportDetails("test_report_1");
        assertNotNull(r);
        assertEquals("DESC_1", r.getDescription());
    }
View Full Code Here


    @Path("{report_key}/run")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public ReportResult run(@Context UriInfo uriInfo,
        @PathParam("report_key") String reportKey) {
        Report r = this.reportFactory.getReport(reportKey);
        if (r == null) {
            // TODO: Throw an appropriate exception once they are moved
            //       into candlepin-common.
            throw new BadRequestException("Report " + reportKey + " not found.");
        }
        return r.run(uriInfo.getQueryParameters());
    }
View Full Code Here

    public static String randomString(String prefix) {
        return prefix + "-" + RandomStringUtils.randomAlphabetic(16);
    }

    public static Report mockReport(String key, String desc) {
        Report r = mock(Report.class);
        when(r.getKey()).thenReturn(key);
        when(r.getDescription()).thenReturn(desc);
        return r;
    }
View Full Code Here

TOP

Related Classes of org.candlepin.gutterball.report.Report

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.