use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldBeEqual_newAssertionError_without_JUnit_Test method setUp.
@Before
public void setUp() {
Failures.instance().setRemoveAssertJRelatedElementsFromStackTrace(false);
description = new TestDescription("Jedi");
factory = (ShouldBeEqual) shouldBeEqual("Luke", "Yoda", new StandardRepresentation());
constructorInvoker = mock(ConstructorInvoker.class, withSettings().defaultAnswer(CALLS_REAL_METHODS));
factory.constructorInvoker = constructorInvoker;
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldBeEqual_newAssertionError_without_JUnit_and_OTA4J_Test method setUp.
@Before
public void setUp() {
Failures.instance().setRemoveAssertJRelatedElementsFromStackTrace(false);
description = new TestDescription("Jedi");
factory = (ShouldBeEqual) shouldBeEqual("Luke", "Yoda", new StandardRepresentation());
constructorInvoker = mock(ConstructorInvoker.class);
factory.constructorInvoker = constructorInvoker;
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldBeDirectory_create_Test method setup.
@Before
public void setup() {
description = new TestDescription("Test");
representation = new StandardRepresentation();
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldBeEmpty_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 empty but was:<[\"Luke\", \"Yoda\"]>"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldBeEqualIgnoringMinutes_create_Test method should_create_error_message_for_LocalTime.
@Test
public void should_create_error_message_for_LocalTime() {
factory = shouldBeEqualIgnoringMinutes(LocalTime.of(12, 0), LocalTime.of(12, 1));
String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(format("[Test] %n" + "Expecting:%n" + " <12:00>%n" + "to have same hour as:%n" + " <12:01>%n" + "but had not."));
}
Aggregations