use of org.assertj.core.data.TolkienCharacter in project assertj-core by joel-costigliola.
the class BaseAssumptionsRunnerTest method setupData.
private static void setupData() {
bart = new CartoonCharacter("Bart Simpson");
lisa = new CartoonCharacter("Lisa Simpson");
maggie = new CartoonCharacter("Maggie Simpson");
homer = new CartoonCharacter("Homer Simpson");
homer.getChildren().add(bart);
homer.getChildren().add(lisa);
homer.getChildren().add(maggie);
CartoonCharacter pebbles = new CartoonCharacter("Pebbles Flintstone");
fred = new CartoonCharacter("Fred Flintstone");
fred.getChildren().add(pebbles);
throwingNameExtractor = TolkienCharacter::getName;
throwingAgeExtractor = TolkienCharacter::getAge;
nameExtractor = TolkienCharacter::getName;
ageExtractor = TolkienCharacter::getAge;
nameExtractorFunction = TolkienCharacter::getName;
ageExtractorFunction = TolkienCharacter::getAge;
frodo = TolkienCharacter.of("Frodo", 33, Race.HOBBIT);
sam = TolkienCharacter.of("Sam", 35, Race.HOBBIT);
childrenExtractor = CartoonCharacter::getChildren;
}
use of org.assertj.core.data.TolkienCharacter in project assertj-core by joel-costigliola.
the class OptionalAssert_get_Test method should_pass_when_optional_contains_a_value.
@Test
public void should_pass_when_optional_contains_a_value() {
TolkienCharacter frodo = TolkienCharacter.of("Frodo", 33, Race.HOBBIT);
assertThat(Optional.of(frodo)).get().hasNoNullFieldsOrProperties();
}
Aggregations