From 58f324ed3ea990e6ee59fc0ec530eb798e69ece3 Mon Sep 17 00:00:00 2001 From: acn-sbuad Date: Wed, 24 Apr 2024 13:21:26 +0200 Subject: [PATCH] changed prop name ContactPointList -> ContactPointsList --- .../User.ContactPoints/UserContactPointService.cs | 2 +- .../User.ContactPoints/UserContactPoints.cs | 2 +- .../API/Controllers/UserContactPointControllerTests.cs | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Altinn.Profile.Core/User.ContactPoints/UserContactPointService.cs b/src/Altinn.Profile.Core/User.ContactPoints/UserContactPointService.cs index 472fc50..b4c1e98 100644 --- a/src/Altinn.Profile.Core/User.ContactPoints/UserContactPointService.cs +++ b/src/Altinn.Profile.Core/User.ContactPoints/UserContactPointService.cs @@ -56,7 +56,7 @@ public async Task> GetContactPoints(List { - resultList.ContactPointList.Add( + resultList.ContactPointsList.Add( new UserContactPoints() { UserId = profile.PartyId, diff --git a/src/Altinn.Profile.Core/User.ContactPoints/UserContactPoints.cs b/src/Altinn.Profile.Core/User.ContactPoints/UserContactPoints.cs index 8b6afc1..e7e335c 100644 --- a/src/Altinn.Profile.Core/User.ContactPoints/UserContactPoints.cs +++ b/src/Altinn.Profile.Core/User.ContactPoints/UserContactPoints.cs @@ -39,5 +39,5 @@ public class UserContactPointsList /// /// A list containing contact points for users /// - public List ContactPointList { get; set; } = []; + public List ContactPointsList { get; set; } = []; } diff --git a/test/Altinn.Profile.Tests/IntegrationTests/API/Controllers/UserContactPointControllerTests.cs b/test/Altinn.Profile.Tests/IntegrationTests/API/Controllers/UserContactPointControllerTests.cs index d345542..beea3ee 100644 --- a/test/Altinn.Profile.Tests/IntegrationTests/API/Controllers/UserContactPointControllerTests.cs +++ b/test/Altinn.Profile.Tests/IntegrationTests/API/Controllers/UserContactPointControllerTests.cs @@ -134,7 +134,7 @@ public async Task PostLookup_NoNationalIdentityNumbers_EmptyListReturned() Assert.Equal(HttpStatusCode.OK, response.StatusCode); string responseContent = await response.Content.ReadAsStringAsync(); var actual = JsonSerializer.Deserialize(responseContent, _serializerOptions); - Assert.Empty(actual.ContactPointList); + Assert.Empty(actual.ContactPointsList); } [Fact] @@ -158,8 +158,8 @@ public async Task PostLookup_SingleProfileNotFoundInBridge_RemainingUsersReturne Assert.Equal(HttpStatusCode.OK, response.StatusCode); string responseContent = await response.Content.ReadAsStringAsync(); var actual = JsonSerializer.Deserialize(responseContent, _serializerOptions); - Assert.Single(actual.ContactPointList); - Assert.NotEmpty(actual.ContactPointList[0].Email); + Assert.Single(actual.ContactPointsList); + Assert.NotEmpty(actual.ContactPointsList[0].Email); } [Fact] @@ -183,8 +183,8 @@ public async Task PostLookup_SingleUser_DetailsReturned() Assert.Equal(HttpStatusCode.OK, response.StatusCode); string responseContent = await response.Content.ReadAsStringAsync(); var actual = JsonSerializer.Deserialize(responseContent, _serializerOptions); - Assert.Single(actual.ContactPointList); - Assert.NotEmpty(actual.ContactPointList[0].Email); + Assert.Single(actual.ContactPointsList); + Assert.NotEmpty(actual.ContactPointsList[0].Email); } private async Task GetSBlResponseForSsn(string ssn)