use of java.util.concurrent.atomic.AtomicStampedReference 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>"));
}
Aggregations