use of com.google.api.ads.adwords.lib.utils.ReportDownloadResponse in project googleads-java-lib by googleads.
the class ReportDownloaderTest method testSuccess.
@Test
public void testSuccess() throws Exception {
ByteArrayInputStream stream = new ByteArrayInputStream("Report data".getBytes(AdHocReportDownloadHelper.REPORT_CHARSET));
RawReportDownloadResponse rawResponse = new RawReportDownloadResponse(200, stream, AdHocReportDownloadHelper.REPORT_CHARSET, DownloadFormat.CSV.name());
ReportDownloadResponse response = downloadReport(DownloadFormat.CSV, rawResponse, null);
assertEquals(200, response.getHttpStatus());
assertEquals(stream, response.getInputStream());
assertEquals("SUCCESS", response.getHttpResponseMessage());
}
Aggregations