use of org.assertj.core.presentation.StandardRepresentation in project assertj-core by joel-costigliola.
the class ShouldBeLess_create_Test method should_create_error_message.
@Test
public void should_create_error_message() {
String message = factory.create(new TextDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(String.format("[Test] %n" + "Expecting:%n" + " <8>%n" + "to be less than:%n" + " <6> "));
}
use of org.assertj.core.presentation.StandardRepresentation in project assertj-core by joel-costigliola.
the class ShouldEndWithPath_create_Test method should_create_error_message.
@Test
public void should_create_error_message() {
final Path actual = mock(Path.class);
final Path other = mock(Path.class);
String actualMessage = shouldEndWith(actual, other).create(new TestDescription("Test"), new StandardRepresentation());
assertThat(actualMessage).isEqualTo(String.format("[Test] " + PATH_SHOULD_END_WITH, actual, other));
}
use of org.assertj.core.presentation.StandardRepresentation in project assertj-core by joel-costigliola.
the class ShouldExist_create_Test method setUp.
@Before
public void setUp() {
description = new TestDescription("Test");
representation = new StandardRepresentation();
}
use of org.assertj.core.presentation.StandardRepresentation in project assertj-core by joel-costigliola.
the class ShouldHaveAnnotations_create_Test method should_create_error_message.
@Test
public void should_create_error_message() {
String message = factory.create(new TextDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(String.format("[Test] %n" + "Expecting%n" + " <org.assertj.core.error.ShouldHaveAnnotations_create_Test>%n" + "to have annotations:%n" + " <[java.lang.Override, java.lang.Deprecated]>%n" + "but the following annotations were not found:%n" + " <[java.lang.SuppressWarnings]>"));
}
use of org.assertj.core.presentation.StandardRepresentation in project assertj-core by joel-costigliola.
the class ShouldHaveAtIndex_create_Test method should_create_error_message.
@Test
public void should_create_error_message() {
ErrorMessageFactory factory = shouldHaveAtIndex(newArrayList("Yoda", "Luke"), new TestCondition<String>("red lightsaber"), Index.atIndex(1), "Luke");
String message = factory.create(new TextDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(String.format("[Test] %nExpecting:%n <\"Luke\">%nat index <1> to have:%n <red lightsaber>%nin:%n" + " <[\"Yoda\", \"Luke\"]>%n"));
}
Aggregations