use of org.assertj.core.presentation.StandardRepresentation in project assertj-core by joel-costigliola.
the class ShouldContainsOnlyOnce_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] %nExpecting:%n" + " <[\"Yoda\", \"Han\", \"Han\"]>%n" + "to contain only once:%n" + " <[\"Luke\", \"Yoda\"]>%n" + "but some elements were not found:%n" + " <[\"Luke\"]>%n" + "and others were found more than once:%n" + " <[\"Han\"]>%n"));
}
use of org.assertj.core.presentation.StandardRepresentation in project assertj-core by joel-costigliola.
the class ShouldContainsStringOnlyOnce_create_Test method should_create_error_message_when_string_to_search_appears_several_times.
@Test
public void should_create_error_message_when_string_to_search_appears_several_times() {
String message = factoryWithSeveralOccurrences.create(new TestDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(String.format("[Test] %nExpecting:%n <\"motif\">%nto appear only once in:%n <\"aaamotifmotifaabbbmotifaaa\">%nbut it appeared 3 times "));
}
use of org.assertj.core.presentation.StandardRepresentation in project assertj-core by joel-costigliola.
the class ShouldContainsStringOnlyOnce_create_Test method should_create_error_message_when_string_to_search_does_not_appear.
@Test
public void should_create_error_message_when_string_to_search_does_not_appear() {
String message = factoryWithNoOccurrence.create(new TestDescription("Test"), new StandardRepresentation());
assertThat(message).isEqualTo(String.format("[Test] %nExpecting:%n <\"motif\">%nto appear only once in:%n <\"aaamodifmoifaabbbmotfaaa\">%nbut it did not appear "));
}
use of org.assertj.core.presentation.StandardRepresentation 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.presentation.StandardRepresentation 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\"]>"));
}
Aggregations