@Override public ReportDownloadResponse downloadReport(String reportQuery, DownloadFormat format) throws ReportException, ReportDownloadResponseException { return adHocReportDownloadHelper.downloadReport( new AwqlReportRequest(reportQuery, format), new DetailedReportDownloadResponseException.Builder()); }
@Test public void testGetRequestType() { AwqlReportRequest request = new AwqlReportRequest("SELECT foo, bar", DownloadFormat.CSV); assertEquals("Incorrect request type", RequestType.AWQL, request.getRequestType()); } }
@Override public ReportDownloadResponse downloadReport(String reportQuery, DownloadFormat format) throws ReportException, ReportDownloadResponseException { return adHocReportDownloadHelper.downloadReport( new AwqlReportRequest(reportQuery, format), new DetailedReportDownloadResponseException.Builder()); }
@Test public void testConstructor_nullArgs_fails() { thrown.expect(NullPointerException.class); thrown.expectMessage("query"); new AwqlReportRequest(null, null); }
@Test public void testConstructor_nullFormat_fails() { thrown.expect(NullPointerException.class); thrown.expectMessage("download format"); new AwqlReportRequest("SELECT foo, bar", null); }
@Test public void testConstructor_nullQuery_fails() { thrown.expect(NullPointerException.class); thrown.expectMessage("query"); new AwqlReportRequest(null, DownloadFormat.CSV); }