Skip to content

Commit

Permalink
fix: make firstname, lastname, identifier required for changePersonIn…
Browse files Browse the repository at this point in the history
…formationAsync function
  • Loading branch information
berka3 committed Mar 5, 2025
1 parent bef21e5 commit 392c019
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit 392c019

Please sign in to comment.