Skip to content

Commit

Permalink
NoIssue: some more cleanup in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbartels committed Nov 12, 2021
1 parent 938029b commit 0ab4451
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/test/java/com/restfb/types/WebhookWhatsappTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

import static com.restfb.testutils.RestfbAssertions.assertThat;

import com.restfb.types.webhook.whatsapp.*;
import org.junit.jupiter.api.Test;

import com.restfb.AbstractJsonMapperTests;
import com.restfb.types.webhook.ChangeValue;
import com.restfb.types.webhook.WebhookEntry;
import com.restfb.types.webhook.WebhookObject;
import com.restfb.types.webhook.whatsapp.*;

public class WebhookWhatsappTest extends AbstractJsonMapperTests {
class WebhookWhatsappTest extends AbstractJsonMapperTests {

@Test
void messageTemplateStatusUpdate_approved() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/restfb/util/MappingUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

import static org.junit.jupiter.api.Assertions.*;

import com.restfb.types.features.HasProfilePicture;
import org.junit.jupiter.api.Test;

import com.restfb.DefaultJsonMapper;
import com.restfb.types.ProfilePictureSource;
import com.restfb.types.features.HasProfilePicture;

class MappingUtilsTest {

class FakeClass implements HasProfilePicture {
static class FakeClass implements HasProfilePicture {

@Override
public ProfilePictureSource getPicture() {
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/restfb/util/StringUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package com.restfb.util;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Fail.fail;
import static org.assertj.core.api.Fail.failBecauseExceptionWasNotThrown;

import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -64,7 +64,7 @@ void joinListTest_List() {
void toString_null() {
try {
StringUtils.toString(null);
fail("NullPointerException expected");
failBecauseExceptionWasNotThrown(NullPointerException.class);
} catch (NullPointerException npe) {
assertThat(npe).hasMessage("Parameter 'data' cannot be null.");
}
Expand All @@ -79,7 +79,7 @@ void toString_array() {
void toBytes_null() {
try {
StringUtils.toBytes(null);
fail("NullPointerException expected");
failBecauseExceptionWasNotThrown(NullPointerException.class);
} catch (NullPointerException npe) {
assertThat(npe).hasMessage("Parameter 'string' cannot be null.");
}
Expand Down

0 comments on commit 0ab4451

Please sign in to comment.