Skip to content

Commit

Permalink
#153 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bindambc committed May 6, 2024
1 parent efdef90 commit 306194e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/test/java/com/whatsapp/api/MockServerUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.whatsapp.api.impl.WhatsappBusinessCloudApi;
import com.whatsapp.api.impl.WhatsappBusinessManagementApi;
import mockwebserver3.MockWebServer;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down Expand Up @@ -43,9 +44,11 @@ public void setUp() throws IOException {

@AfterEach
public void tearDown() throws IOException {

mockWebServer.close();
mockWebServer.shutdown();
}




}
Original file line number Diff line number Diff line change
Expand Up @@ -1128,9 +1128,9 @@ void testTwoStepVerification() throws IOException, URISyntaxException, Interrupt


@Test
void testApiVersion() throws IOException, URISyntaxException, InterruptedException {
void testApiVersion() throws InterruptedException {

mockWebServer.enqueue(new MockResponse().setResponseCode(200).setBody(DEFAULT_SEND_MESSAGE_RESPONSE));
mockWebServer.enqueue(new MockResponse().newBuilder().code(200).body(DEFAULT_SEND_MESSAGE_RESPONSE).build());

var message = MessageBuilder.builder()//
.setTo(PHONE_NUMBER_1)//
Expand Down

0 comments on commit 306194e

Please sign in to comment.