-
-
Save pawelpluta/3f7c5f713e9df1c66cec8054c2f29bf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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