use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldBeEqualIgnoringNanos_create_Test method should_create_error_message_for_LocalTime.
@Test
public void should_create_error_message_for_LocalTime() {
factory = shouldBeEqualIgnoringNanos(LocalTime.of(12, 0), LocalTime.of(13, 0));
String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(format("[Test] %n" + "Expecting:%n" + " <12:00>%n" + "to have same hour, minute and second as:%n" + " <13:00>%n" + "but had not."));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldBeInstanceOfAny_create_Test method should_create_error_message.
@Test
public void should_create_error_message() {
String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(format("[Test] %n" + "Expecting:%n" + " <\"Yoda\">%n" + "to be an instance of any of:%n" + " <[java.io.File, java.util.regex.Pattern]>%n" + "but was instance of:%n" + " <java.lang.String>"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldBeInstance_create_Test method should_create_error_message.
@Test
public void should_create_error_message() {
String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(format("[Test] %n" + "Expecting:%n" + " <\"Yoda\">%n" + "to be an instance of:%n" + " <java.io.File>%n" + "but was instance of:%n" + " <java.lang.String>"));
}
use of org.assertj.core.internal.TestDescription 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.internal.TestDescription 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();
}
Aggregations