public async Task When_Partially_Update_Current_User_Then_Ok_Is_Returned() { // ARRANGE var patchOperation = new PatchOperationBuilder().SetType(PatchOperations.replace) .SetPath(Common.Constants.UserResourceResponseNames.UserName) .SetContent("new_username") .Build(); InitializeFakeObjects(); _httpClientFactoryStub.Setup(h => h.GetHttpClient()).Returns(_testScimServerFixture.Client); // ACT var scimResponse = await _usersClient.AddAuthenticatedUser(baseUrl, "token"); var scimId = scimResponse.Content["id"].ToString(); UserStore.Instance().ScimId = scimId; var thirdResult = await _usersClient.PartialUpdateAuthenticatedUser(baseUrl, scimId) .AddOperation(patchOperation) .Execute(); UserStore.Instance().ScimId = null; // ASSERT Assert.Equal(HttpStatusCode.OK, thirdResult.StatusCode); }