Skip to content

Instantly share code, notes, and snippets.

@Gogetter
Created April 2, 2022 13:07
Show Gist options
  • Save Gogetter/fc8683fee973e5bf1729a1223eb96d4a to your computer and use it in GitHub Desktop.
Save Gogetter/fc8683fee973e5bf1729a1223eb96d4a to your computer and use it in GitHub Desktop.
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())));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment