Search in sources :

Example 1 with AtomicStampedReference

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>"));
}
Also used : TestDescription(org.assertj.core.internal.TestDescription) AtomicStampedReference(java.util.concurrent.atomic.AtomicStampedReference) Test(org.junit.Test)

Aggregations

AtomicStampedReference (java.util.concurrent.atomic.AtomicStampedReference)1 TestDescription (org.assertj.core.internal.TestDescription)1 Test (org.junit.Test)1