Search in sources :

Example 1 with Representation

use of org.assertj.core.presentation.Representation in project assertj-core by joel-costigliola.

the class BasicErrorMessageFactory_create_Test method should_implement_toString.

@Test
public void should_implement_toString() {
    Description description = new TestDescription("Test");
    Representation representation = new StandardRepresentation();
    String formattedMessage = "[Test] Hello Yoda";
    when(formatter.format(description, representation, "Hello %s", "Yoda")).thenReturn(formattedMessage);
    assertThat(factory.create(description, representation)).isEqualTo(formattedMessage);
}
Also used : TestDescription(org.assertj.core.internal.TestDescription) Description(org.assertj.core.description.Description) EmptyTextDescription.emptyDescription(org.assertj.core.description.EmptyTextDescription.emptyDescription) TestDescription(org.assertj.core.internal.TestDescription) StandardRepresentation(org.assertj.core.presentation.StandardRepresentation) Representation(org.assertj.core.presentation.Representation) StandardRepresentation(org.assertj.core.presentation.StandardRepresentation) Test(org.junit.Test)

Aggregations

Description (org.assertj.core.description.Description)1 EmptyTextDescription.emptyDescription (org.assertj.core.description.EmptyTextDescription.emptyDescription)1 TestDescription (org.assertj.core.internal.TestDescription)1 Representation (org.assertj.core.presentation.Representation)1 StandardRepresentation (org.assertj.core.presentation.StandardRepresentation)1 Test (org.junit.Test)1