use of com.xrtb.exchanges.google.GoogleBidRequest in project XRTB by benmfaul.
the class MyReader method testGoogleProtobufBanner.
/**
* Test a valid bid response.
*
* @throws Exception
* on networking errors.
*/
//@Test
public void testGoogleProtobufBanner() throws Exception {
HttpPostGet http = new HttpPostGet();
GoogleBidRequest google = GoogleBidRequest.fromRTBFile("./SampleBids/nexage.txt");
byte[] protobytes = google.getInternal().toByteArray();
byte[] returns = http.sendPost("http://" + Config.testHost + "/rtb/bids/google", protobytes, 300000, 300000);
int code = http.getResponseCode();
assertTrue(code == 200);
assertNotNull(returns);
GoogleBidResponse rr = new GoogleBidResponse(returns);
System.out.println(rr.getInternal());
}
use of com.xrtb.exchanges.google.GoogleBidRequest in project XRTB by benmfaul.
the class MyReader method testGoogleProtobufVideo.
//@Test
public void testGoogleProtobufVideo() throws Exception {
HttpPostGet http = new HttpPostGet();
GoogleBidRequest google = GoogleBidRequest.fromRTBFile("./SampleBids/nexage.txt");
byte[] protobytes = google.getInternal().toByteArray();
byte[] returns = http.sendPost("http://" + Config.testHost + "/rtb/bids/google", protobytes, 300000, 300000);
int code = http.getResponseCode();
assertTrue(code == 200);
assertNotNull(returns);
GoogleBidResponse rr = new GoogleBidResponse(returns);
System.out.println(rr.getInternal());
}
Aggregations