use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldHaveUserInfo_create_Test method should_create_error_message_for_uri_has_user_info.
@Test
public void should_create_error_message_for_uri_has_user_info() throws Exception {
URI uri = new URI("http://test:pass@assertj.org/news");
String error = shouldHaveUserInfo(uri, "test:success").create(new TestDescription("TEST"));
assertThat(error).isEqualTo(format("[TEST] %n" + "Expecting user info of%n" + " <http://test:pass@assertj.org/news>%n" + "to be:%n" + " <\"test:success\">%n" + "but was:%n" + " <\"test:pass\">"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldHaveStamp_create_Test method should_create_error_message.
@Test
public void should_create_error_message() throws Exception {
// GIVEN
AtomicStampedReference<String> actual = new AtomicStampedReference<>("foo", 1234);
// WHEN
String message = shouldHaveStamp(actual, 5678).create(new TestDescription("TEST"), CONFIGURATION_PROVIDER.representation());
// THEN
assertThat(message).isEqualTo(format("[TEST] %n" + "Expecting%n" + " <AtomicStampedReference[stamp=1234, reference=\"foo\"]>%n" + "to have stamp:%n" + " <5678>%n" + "but had:%n" + " <1234>"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldNotBeEmpty_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 empty"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldNotBeEqualIgnoringCase_create_Test method should_create_error_message.
@Test
public void should_create_error_message() {
String message = factory.create(new TestDescription("Test"));
assertThat(message).isEqualTo(format("[Test] %n" + "Expecting:%n" + " <\"Yoda\">%n" + "not to be equal to:%n" + " <\"Luke\">%n" + "ignoring case considerations"));
}
use of org.assertj.core.internal.TestDescription in project assertj-core by joel-costigliola.
the class ShouldNotBeEqualIgnoringWhitespace_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] %n" + "Expecting:%n" + " <\" my\tfoo bar \">%n" + "not to be equal to:%n" + " <\" my foo bar \">%n" + "ignoring whitespace differences"));
}
Aggregations