Skip to content

Commit 15a76d2

Browse files
committed
More Trn properties
1 parent 39f97c5 commit 15a76d2

File tree

31 files changed

+128
-132
lines changed

31 files changed

+128
-132
lines changed

TeachingRecordSystem/src/TeachingRecordSystem.Api/V3/Implementation/Operations/GetPersonHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ where p.merged_with_person_id is null
4343

4444
if (person.Trn != trn)
4545
{
46-
return ApiError.RecordIsMerged(trn, person.Trn!);
46+
return ApiError.RecordIsMerged(trn, person.Trn);
4747
}
4848

4949
return person;

TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/BatchSendProfessionalStatusEmailsJob.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ and payload->'OldPersonAttributes'->>'QtsDate' is null
102102
["last name"] = qtsAwardee.LastName
103103
};
104104

105-
var metadata = new Dictionary<string, object> { [SendAytqInviteEmailJob.JobMetadataKeys.Trn] = qtsAwardee.Trn! };
105+
var metadata = new Dictionary<string, object> { [SendAytqInviteEmailJob.JobMetadataKeys.Trn] = qtsAwardee.Trn };
106106

107107
var email = new Email
108108
{
@@ -157,7 +157,7 @@ and payload->'OldPersonAttributes'->>'EytsDate' is null
157157
["last name"] = eytsAwardee.LastName
158158
};
159159

160-
var metadata = new Dictionary<string, object> { [SendAytqInviteEmailJob.JobMetadataKeys.Trn] = eytsAwardee.Trn! };
160+
var metadata = new Dictionary<string, object> { [SendAytqInviteEmailJob.JobMetadataKeys.Trn] = eytsAwardee.Trn };
161161

162162
var email = new Email
163163
{

TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Shared/PersonDetailViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public record PersonDetailViewModel
44
{
55
public required Guid PersonId { get; init; }
66
public required PersonDetailViewModelOptions Options { get; init; }
7-
public required string? Trn { get; init; }
7+
public required string Trn { get; init; }
88
public required string Name { get; init; }
99
public required string[] PreviousNames { get; init; }
1010
public required DateOnly? DateOfBirth { get; init; }

TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Shared/_PersonDetail.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
}
4545
<govuk-summary-list-row>
4646
<govuk-summary-list-row-key>TRN</govuk-summary-list-row-key>
47-
<govuk-summary-list-row-value use-empty-fallback>@Model.Trn</govuk-summary-list-row-value>
47+
<govuk-summary-list-row-value>@Model.Trn</govuk-summary-list-row-value>
4848
</govuk-summary-list-row>
4949
<govuk-summary-list-row>
5050
<govuk-summary-list-row-key>National Insurance number</govuk-summary-list-row-key>

TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/SupportTasks/TeacherPensions/Resolve/ResolveTeacherPensionsPotentialDuplicatePageModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected TeacherPensionsPotentialDuplicateAttributes GetPersonAttributesFromReq
173173
DateOfBirth = requestData.DateOfBirth,
174174
NationalInsuranceNumber = requestData.NationalInsuranceNumber,
175175
Gender = requestData.Gender,
176-
Trn = person.Trn!
176+
Trn = person.Trn
177177
};
178178
}
179179

TeachingRecordSystem/tests/TeachingRecordSystem.Api.IntegrationTests/V3/V20240606/CreateDateOfBirthChangeTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public async Task Post_InvalidRequest_ReturnsBadRequest(
3737
};
3838

3939
// Act
40-
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn!).SendAsync(request);
40+
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn).SendAsync(request);
4141

4242
// Assert
4343
Assert.Equal(StatusCodes.Status400BadRequest, (int)response.StatusCode);
@@ -110,7 +110,7 @@ public async Task Post_EvidenceFileDoesNotExist_ReturnsError()
110110
};
111111

112112
// Act
113-
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn!).SendAsync(request);
113+
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn).SendAsync(request);
114114

115115
// Assert
116116
await AssertEx.JsonResponseIsErrorAsync(response, 10028, StatusCodes.Status400BadRequest);
@@ -157,7 +157,7 @@ public async Task Post_ValidRequest_CreatesSupportTaskAndSendsEmailAndReturnsTic
157157
};
158158

159159
// Act
160-
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn!).SendAsync(request);
160+
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn).SendAsync(request);
161161

162162
// Assert
163163
Assert.Equal(StatusCodes.Status200OK, (int)response.StatusCode);

TeachingRecordSystem/tests/TeachingRecordSystem.Api.IntegrationTests/V3/V20240606/CreateNameChangeTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public async Task Post_InvalidRequest_ReturnsBadRequest(
3939
};
4040

4141
// Act
42-
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn!).SendAsync(request);
42+
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn).SendAsync(request);
4343

4444
// Assert
4545
Assert.Equal(StatusCodes.Status400BadRequest, (int)response.StatusCode);
@@ -70,7 +70,7 @@ public async Task Post_EvidenceFileDoesNotExist_ReturnsError()
7070
};
7171

7272
// Act
73-
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn!).SendAsync(request);
73+
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn).SendAsync(request);
7474

7575
// Assert
7676
await AssertEx.JsonResponseIsErrorAsync(response, 10028, StatusCodes.Status400BadRequest);
@@ -121,7 +121,7 @@ public async Task Post_ValidRequest_CreatesSupportTaskAndSendsEmailAndReturnsTic
121121
};
122122

123123
// Act
124-
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn!).SendAsync(request);
124+
var response = await GetHttpClientWithIdentityAccessToken(createPersonResult.Trn).SendAsync(request);
125125

126126
// Assert
127127
Assert.Equal(StatusCodes.Status200OK, (int)response.StatusCode);

TeachingRecordSystem/tests/TeachingRecordSystem.Api.IntegrationTests/V3/V20240920/GetPersonTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public async Task Get_ValidRequestWithAlerts_ReturnsExpectedAlertsContent()
1616

1717
var request = new HttpRequestMessage(HttpMethod.Get, $"/v3/person?include=Alerts");
1818

19-
var httpClient = GetHttpClientWithIdentityAccessToken(person.Trn!);
19+
var httpClient = GetHttpClientWithIdentityAccessToken(person.Trn);
2020

2121
// Act
2222
var response = await httpClient.SendAsync(request);

TeachingRecordSystem/tests/TeachingRecordSystem.Api.UnitTests/V3/CreateDateOfBirthChangeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public async Task HandleAsync_EvidenceFileDoesNotExist_ReturnsError()
2525
var createPersonResult = await TestData.CreatePersonAsync();
2626
var command = await CreateCommand() with
2727
{
28-
Trn = createPersonResult.Trn!,
28+
Trn = createPersonResult.Trn,
2929
EvidenceFileUrl = "https://nonexistenturl.com"
3030
};
3131

@@ -43,7 +43,7 @@ public async Task HandleAsync_ValidRequest_CreatesSupportTaskAndSendsEmailAndRet
4343
var createPersonResult = await TestData.CreatePersonAsync();
4444
var command = await CreateCommand() with
4545
{
46-
Trn = createPersonResult.Trn!
46+
Trn = createPersonResult.Trn
4747
};
4848

4949
// Act

TeachingRecordSystem/tests/TeachingRecordSystem.Api.UnitTests/V3/CreateNameChangeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public async Task HandleAsync_EvidenceFileDoesNotExist_ReturnsError()
2525
var createPersonResult = await TestData.CreatePersonAsync();
2626
var command = await CreateCommand() with
2727
{
28-
Trn = createPersonResult.Trn!,
28+
Trn = createPersonResult.Trn,
2929
EvidenceFileUrl = "https://nonexistenturl.com"
3030
};
3131

@@ -43,7 +43,7 @@ public async Task HandleAsync_ValidRequest_CreatesSupportTaskAndSendsEmailAndRet
4343
var createPersonResult = await TestData.CreatePersonAsync();
4444
var command = await CreateCommand() with
4545
{
46-
Trn = createPersonResult.Trn!
46+
Trn = createPersonResult.Trn
4747
};
4848
// Act
4949
var result = await ExecuteCommandAsync(command);

0 commit comments

Comments
 (0)