use of org.assertj.core.api.StringAssert in project zeebe-process-test by camunda.
the class IncidentAssert method extractingErrorMessage.
/**
* Extracts the error message for further assertions
*
* @return {@link StringAssert} of error message
*/
public StringAssert extractingErrorMessage() {
final IncidentRecordValue record = getIncidentCreatedRecordValue();
final String actualErrorMessage = record.getErrorMessage();
return new StringAssert(actualErrorMessage);
}
use of org.assertj.core.api.StringAssert in project assertj-core by joel-costigliola.
the class IterableAssert_first_Test method should_pass_allowing_type_narrowed_assertions_if_assertion_was_created_with_assert_factory.
@Test
void should_pass_allowing_type_narrowed_assertions_if_assertion_was_created_with_assert_factory() {
// GIVEN
AssertFactory<String, StringAssert> assertFactory = StringAssert::new;
// WHEN
StringAssert result = assertThat(iterable, assertFactory).first();
// THEN
result.startsWith("Hom");
}
use of org.assertj.core.api.StringAssert in project assertj-core by joel-costigliola.
the class IterableAssert_element_Test method should_pass_allowing_type_narrowed_assertions_if_assertion_was_created_with_assert_factory.
@Test
void should_pass_allowing_type_narrowed_assertions_if_assertion_was_created_with_assert_factory() {
// GIVEN
AssertFactory<String, StringAssert> assertFactory = StringAssert::new;
// WHEN
StringAssert result = assertThat(iterable, assertFactory).element(1);
// THEN
result.startsWith("Mar");
}
use of org.assertj.core.api.StringAssert in project assertj-core by joel-costigliola.
the class IterableAssert_singleElement_Test method should_pass_allowing_type_narrowed_assertions_if_assertion_was_created_with_assert_factory.
@Test
void should_pass_allowing_type_narrowed_assertions_if_assertion_was_created_with_assert_factory() {
// GIVEN
AssertFactory<String, StringAssert> assertFactory = StringAssert::new;
// WHEN
StringAssert result = assertThat(babySimpsons, assertFactory).singleElement();
// THEN
result.startsWith("Mag");
}
use of org.assertj.core.api.StringAssert in project assertj-core by assertj.
the class IterableAssert_singleElement_Test method should_pass_allowing_type_narrowed_assertions_if_assertion_was_created_with_assert_factory.
@Test
void should_pass_allowing_type_narrowed_assertions_if_assertion_was_created_with_assert_factory() {
// GIVEN
AssertFactory<String, StringAssert> assertFactory = StringAssert::new;
// WHEN
StringAssert result = assertThat(babySimpsons, assertFactory).singleElement();
// THEN
result.startsWith("Mag");
}
Aggregations