use of com.google.api.client.googleapis.testing.services.protobuf.MockGoogleProtoClient in project google-api-java-client by google.
the class CommonGoogleProtoClientRequestInitializerTest method testInitialize.
public void testInitialize() throws Exception {
CommonGoogleProtoClientRequestInitializer key = new CommonGoogleProtoClientRequestInitializer("foo");
MockGoogleProtoClient client = new MockGoogleProtoClient.Builder(new MockHttpTransport(), HttpTesting.SIMPLE_URL, "test/", null).setApplicationName("Test Application").build();
MyRequest request = new MyRequest(client, "GET", "", null, String.class);
assertNull(request.key);
key.initialize(request);
assertEquals("foo", request.key);
}
Aggregations