use of uk.gov.justice.services.messaging.Metadata in project microservice_framework by CJSCommonPlatform.
the class JsonEnvelopeMetadataMatcherTest method shouldMatchMetadataByVersion.
@Test
public void shouldMatchMetadataByVersion() throws Exception {
final Metadata metadata = metadataWithRandomUUID(EVENT_NAME).withVersion(VERSION).build();
assertThat(metadata, JsonEnvelopeMetadataMatcher.metadata().withVersion(VERSION));
}
use of uk.gov.justice.services.messaging.Metadata in project microservice_framework by CJSCommonPlatform.
the class JsonEnvelopeMetadataMatcherTest method shouldFailIfIdDoesNotMatch.
@Test(expected = AssertionError.class)
public void shouldFailIfIdDoesNotMatch() throws Exception {
final Metadata metadata = metadataWithRandomUUID(EVENT_NAME).build();
assertThat(metadata, JsonEnvelopeMetadataMatcher.metadata().withId(randomUUID()));
}
use of uk.gov.justice.services.messaging.Metadata in project microservice_framework by CJSCommonPlatform.
the class JsonEnvelopeMetadataMatcherTest method shouldMatchMetadataById.
@Test
public void shouldMatchMetadataById() throws Exception {
final Metadata metadata = metadataOf(ID, EVENT_NAME).build();
assertThat(metadata, JsonEnvelopeMetadataMatcher.metadata().withId(ID));
}
use of uk.gov.justice.services.messaging.Metadata in project microservice_framework by CJSCommonPlatform.
the class JsonEnvelopeMetadataMatcherTest method shouldMatchMetadataByCausation.
@Test
public void shouldMatchMetadataByCausation() throws Exception {
final Metadata metadata = metadataWithRandomUUID(EVENT_NAME).withCausation(CAUSATION_ID).build();
assertThat(metadata, JsonEnvelopeMetadataMatcher.metadata().withCausationIds(CAUSATION_ID));
}
use of uk.gov.justice.services.messaging.Metadata in project microservice_framework by CJSCommonPlatform.
the class JsonEnvelopeMetadataMatcherTest method shouldMatchMetadataByUserId.
@Test
public void shouldMatchMetadataByUserId() throws Exception {
final Metadata metadata = metadataWithRandomUUID(EVENT_NAME).withUserId(USER_ID).build();
assertThat(metadata, JsonEnvelopeMetadataMatcher.metadata().withUserId(USER_ID));
}
Aggregations