use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldNotBeInstanceOfAny_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" + "not to be an instance of any of these types:%n" + " <[java.lang.String, java.lang.Object]>"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldNotBeInstance_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" + "not to be an instance of:<java.lang.String>"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldNotBeNull_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(String.format("[Test] %nExpecting actual not to be null"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldHaveCompletedExceptionally_create_Test method should_create_error_message.
@Test
public void should_create_error_message() throws Exception {
String error = shouldHaveCompletedExceptionally(new CompletableFuture<>()).create(new TestDescription("TEST"));
assertThat(error).isEqualTo(format("[TEST] %n" + "Expecting%n" + " <CompletableFuture[Incomplete]>%n" + "to be completed exceptionally.%n%s", WARNING));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldHaveFailed_create_Test method should_create_error_message.
@Test
public void should_create_error_message() throws Exception {
String error = shouldHaveFailed(new CompletableFuture<>()).create(new TestDescription("TEST"));
assertThat(error).isEqualTo(format("[TEST] %n" + "Expecting%n" + " <CompletableFuture[Incomplete]>%n" + "to have failed (i.e. completed exceptionally and not cancelled).%n%s", WARNING));
}
Aggregations