Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make firstname, lastname, identifier required for changePersonIn… #139

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ suspend fun XesarConnect.queryPersonByExternalId(externalId: String): Person? {
* @param requestConfig The request configuration (optional).
*/
suspend fun XesarConnect.changePersonInformationAsync(
firstName: String? = null,
lastName: String? = null,
identifier: String? = null,
firstName: String,
lastName: String,
identifier: String,
externalId: String,
requestConfig: XesarConnect.RequestConfig = buildRequestConfig(),
): SingleEventResult<PersonChanged> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ChangePersonInformationTest :
val commandContent = commandReceived.await()

commandContent.shouldBeEqual(
"{\"commandId\":\"00000000-1281-40ae-89d7-5c541d77a757\",\"firstName\":\"first name\",\"lastName\":null,\"identifier\":null,\"externalId\":\"EXT-4711\",\"token\":\"JDJhJDEwJDFSNEljZ2FaRUNXUXBTQ25XN05KbE9qRzFHQ1VjMzkvWTBVcFpZb1M4Vmt0dnJYZ0tJVFBx\"}"
"{\"commandId\":\"00000000-1281-40ae-89d7-5c541d77a757\",\"firstName\":\"first name\",\"lastName\":\"last name\",\"identifier\":\"\",\"externalId\":\"EXT-4711\",\"token\":\"JDJhJDEwJDFSNEljZ2FaRUNXUXBTQ25XN05KbE9qRzFHQ1VjMzkvWTBVcFpZb1M4Vmt0dnJYZ0tJVFBx\"}"
)

val apiEvent =
Expand All @@ -57,6 +57,7 @@ class ChangePersonInformationTest :
id = UUID.fromString("43edc7cf-80ab-4486-86db-41cda2c7a2cd"),
firstName = "first name",
lastName = "last name",
identifier = "",
),
)

Expand All @@ -73,6 +74,8 @@ class ChangePersonInformationTest :
val result =
api.changePersonInformationAsync(
firstName = "first name",
lastName = "last name",
identifier = "",
externalId = "EXT-4711",
)
.await()
Expand Down