use of com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest in project google-cloud-java by GoogleCloudPlatform.
the class ErrorGroupServiceClientTest method updateGroupTest.
@Test
@SuppressWarnings("all")
public void updateGroupTest() {
GroupName name = GroupName.create("[PROJECT]", "[GROUP]");
String groupId = "groupId506361563";
ErrorGroup expectedResponse = ErrorGroup.newBuilder().setNameWithGroupName(name).setGroupId(groupId).build();
mockErrorGroupService.addResponse(expectedResponse);
ErrorGroup group = ErrorGroup.newBuilder().build();
ErrorGroup actualResponse = client.updateGroup(group);
Assert.assertEquals(expectedResponse, actualResponse);
List<GeneratedMessageV3> actualRequests = mockErrorGroupService.getRequests();
Assert.assertEquals(1, actualRequests.size());
UpdateGroupRequest actualRequest = (UpdateGroupRequest) actualRequests.get(0);
Assert.assertEquals(group, actualRequest.getGroup());
}
use of com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest in project google-cloud-java by GoogleCloudPlatform.
the class GroupServiceClientTest method updateGroupTest.
@Test
@SuppressWarnings("all")
public void updateGroupTest() {
GroupName name = GroupName.create("[PROJECT]", "[GROUP]");
String displayName = "displayName1615086568";
GroupName parentName = GroupName.create("[PROJECT]", "[GROUP]");
String filter = "filter-1274492040";
boolean isCluster = false;
Group expectedResponse = Group.newBuilder().setNameWithGroupName(name).setDisplayName(displayName).setParentNameWithGroupName(parentName).setFilter(filter).setIsCluster(isCluster).build();
mockGroupService.addResponse(expectedResponse);
Group group = Group.newBuilder().build();
Group actualResponse = client.updateGroup(group);
Assert.assertEquals(expectedResponse, actualResponse);
List<GeneratedMessageV3> actualRequests = mockGroupService.getRequests();
Assert.assertEquals(1, actualRequests.size());
UpdateGroupRequest actualRequest = (UpdateGroupRequest) actualRequests.get(0);
Assert.assertEquals(group, actualRequest.getGroup());
}
Aggregations