Skip to content

Instantly share code, notes, and snippets.

@Gogetter
Created April 2, 2022 13:07
Show Gist options
  • Select an option

  • Save Gogetter/fc8683fee973e5bf1729a1223eb96d4a to your computer and use it in GitHub Desktop.

Select an option

Save Gogetter/fc8683fee973e5bf1729a1223eb96d4a to your computer and use it in GitHub Desktop.

Revisions

  1. Gogetter created this gist Apr 2, 2022.
    13 changes: 13 additions & 0 deletions PersonTest.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    class PersonTest {
    @Test
    void testWhenPersonFetchedRecordComponentsNotNull() {
    Map<String, Object> fetchedPerson = PersonHttpUtil.fetchPerson();
    Person person = Person.from(fetchedPerson);

    assertThat(person, notNullValue());
    assertThat(person.email(), is(not(emptyOrNullString())));
    assertThat(person.fullName(), notNullValue());
    assertThat(person.fullName().first(), is(not(emptyOrNullString())));
    assertThat(person.fullName().last(), is(not(emptyOrNullString())));
    }
    }