def "registered user details should be available via REST"() { | |
given: "there is User Data" | |
String userId = randomAlphabetic(10) | |
String firstName = randomAlphabetic(10) | |
String lastName = randomAlphabetic(10) | |
and: "User Registered event contain user data" | |
UserRegisteredEvent userEvent = anUserRegisteredEvent() | |
.withUserId(userId).withFirstName(firstName).withLastName(lastName) | |
when: "User Registered event was published into kafka" | |
published(userEvent) | |
then: "User Details are available through REST API" | |
WAIT_FOR_PROCESSING.eventually { | |
userDetailsIsRequestedFor(userId).andExpect(jsonPath('$.displayName').value(firstName + " " + lastName)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment