Skip to content

Commit 6f8b76f

Browse files
author
Guilherme Biff Zarelli
committed
test: add verify in use case push test
1 parent 5bc10d9 commit 6f8b76f

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

acceptance-test/src/test/java/br/com/helpdev/atdd/RandomDataApiMock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class RandomDataApiMock {
1111
public static void mockRandomIdNumber(final WireMockServer mockServer) {
1212
mockServer.stubFor(get(urlPathMatching("/api/id_number/random_id_number"))
1313
.willReturn(aResponse()
14-
.withBodyFile("random_id_number_response.json")
14+
.withBodyFile("randomIdNumberResponse.json")
1515
.withStatus(200)
1616
.withHeader("Content-Type", "application/json")));
1717
}

core/use-case/src/test/java/br/com/helpdev/usecase/PushRequestNotificationTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static org.assertj.core.api.Assertions.assertThat;
44
import static org.mockito.Mockito.mock;
5+
import static org.mockito.Mockito.verify;
56
import static org.mockito.Mockito.when;
67

78
import br.com.helpdev.domain.Message;
@@ -49,6 +50,7 @@ void shouldBeCreateMessageWithSuccess() {
4950

5051
final var response = deleteRequestNotification.push(message);
5152

53+
verify(protocolGeneratorClient).generateNewProtocol();
5254
assertThat(response)
5355
.isEqualTo(requiredResponse);
5456
}

0 commit comments

Comments
 (0)