Search in sources :

Example 6 with GetExclusionRequest

use of com.google.logging.v2.GetExclusionRequest in project java-logging by googleapis.

the class LoggingImplTest method testGetExclusion_Null.

@Test
public void testGetExclusion_Null() {
    ApiFuture<LogExclusion> response = ApiFutures.immediateFuture(null);
    GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(EXCLUSION_NAME_PB).build();
    EasyMock.expect(loggingRpcMock.get(request)).andReturn(response);
    EasyMock.replay(rpcFactoryMock, loggingRpcMock);
    logging = options.getService();
    Exclusion exclusion = logging.getExclusion(EXCLUSION_NAME);
    assertNull(exclusion);
}
Also used : LogExclusion(com.google.logging.v2.LogExclusion) LogExclusion(com.google.logging.v2.LogExclusion) GetExclusionRequest(com.google.logging.v2.GetExclusionRequest) Test(org.junit.Test)

Aggregations

GetExclusionRequest (com.google.logging.v2.GetExclusionRequest)6 LogExclusion (com.google.logging.v2.LogExclusion)6 Test (org.junit.Test)6 AbstractMessage (com.google.protobuf.AbstractMessage)2 LogExclusionName (com.google.logging.v2.LogExclusionName)1