Skip to content
Snippets Groups Projects
Commit b30c06a2 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-7037 rename to existsPendingCommands

parent ef8b99ab
Branches
Tags
No related merge requests found
......@@ -76,7 +76,7 @@ public class GrpcOzgCloudCommandService implements OzgCloudCommandService {
return response.getCommandList().stream().map(mapper::fromGrpc).toList();
}
public boolean hasPendingCommands(OzgCloudVorgangId vorgangId) {
public boolean existsPendingCommands(OzgCloudVorgangId vorgangId) {
var response = getCommandServiceStub().existsPendingCommands(buildHasPendingCommandRequest(vorgangId));
return response.getExistsPendingCommands();
}
......
......@@ -207,7 +207,7 @@ class GrpcOzgCloudCommandServiceTest {
}
@Nested
class TestHasPendingCommands {
class TestExistsPendingCommands {
private final GrpcExistsPendingCommandsRequest request = GrpcExistsPendingCommandsRequestTestFactory.create();
......@@ -224,21 +224,21 @@ class GrpcOzgCloudCommandServiceTest {
@Test
void shouldCallBuildHasPendingCommandRequest() {
hasPendingCommands();
existsPendingCommands();
verify(service).buildHasPendingCommandRequest(OzgCloudVorgangTestFactory.ID);
}
@Test
void shouldCallGetCommandServiceStub() {
hasPendingCommands();
existsPendingCommands();
verify(service).getCommandServiceStub();
}
@Test
void shouldCallServiceStubWithInterceptor() {
hasPendingCommands();
existsPendingCommands();
verify(serviceStubWithInterceptor).existsPendingCommands(request);
}
......@@ -249,13 +249,13 @@ class GrpcOzgCloudCommandServiceTest {
var response = GrpcExistsPendingCommandsResponse.newBuilder().setExistsPendingCommands(hasPendingCommands).build();
when(serviceStubWithInterceptor.existsPendingCommands(any())).thenReturn(response);
var result = hasPendingCommands();
var result = existsPendingCommands();
assertThat(result).isEqualTo(hasPendingCommands);
}
private boolean hasPendingCommands() {
return service.hasPendingCommands(OzgCloudVorgangTestFactory.ID);
private boolean existsPendingCommands() {
return service.existsPendingCommands(OzgCloudVorgangTestFactory.ID);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment