Skip to content

Added NPQAccessToken to gettrn journey

Sign in for the full log view
GitHub Actions / TeachingRecordSystem.Core.Tests test results succeeded Dec 5, 2024 in 0s

243 passed, 0 failed and 1 skipped

Tests passed successfully

✅ TeachingRecordSystem/tests/TeachingRecordSystem.Core.Tests/TestResults/_fv-az1432-566_2024-12-05_13_55_53.trx

244 tests were completed in 100s with 243 passed, 0 failed and 1 skipped.

Test suite Passed Failed Skipped Time
TeachingRecordSystem.Core.Tests.ApiSchema.VNext.WebhookData.AlertCreatedNotificationMapperTests 2✅ 7s
TeachingRecordSystem.Core.Tests.ApiSchema.VNext.WebhookData.AlertDeletedNotificationMapperTests 2✅ 6s
TeachingRecordSystem.Core.Tests.ApiSchema.VNext.WebhookData.AlertUpdatedNotificationMapperTests 3✅ 7s
TeachingRecordSystem.Core.Tests.DataStore.Postgres.Models.MandatoryQualificationProviderTests 40✅ 17ms
TeachingRecordSystem.Core.Tests.DataStore.Postgres.Models.PersonTests 6✅ 24ms
TeachingRecordSystem.Core.Tests.EventInfoTests 2✅ 46ms
TeachingRecordSystem.Core.Tests.Jobs.BatchSendEytsAwardedEmailsJobTests 8✅ 4s
TeachingRecordSystem.Core.Tests.Jobs.BatchSendInductionCompletedEmailsJobTests 8✅ 3s
TeachingRecordSystem.Core.Tests.Jobs.BatchSendInternationalQtsAwardedEmailsJobTests 8✅ 3s
TeachingRecordSystem.Core.Tests.Jobs.BatchSendQtsAwardedEmailsJobTests 8✅ 3s
TeachingRecordSystem.Core.Tests.Jobs.EytsAwardedEmailJobDispatcherTests 1✅ 40ms
TeachingRecordSystem.Core.Tests.Jobs.InductionCompletedEmailJobDispatcherTests 1✅ 61ms
TeachingRecordSystem.Core.Tests.Jobs.InternationalQtsAwardedEmailJobDispatcherTests 1✅ 36ms
TeachingRecordSystem.Core.Tests.Jobs.QtsAwardedEmailJobDispatcherTests 1✅ 53ms
TeachingRecordSystem.Core.Tests.Jobs.SendInductionCompletedEmailJobTests 1✅ 179ms
TeachingRecordSystem.Core.Tests.Jobs.SendInternationalQtsAwardedEmailJobTests 1✅ 46ms
TeachingRecordSystem.Core.Tests.Jobs.SendQtsAwardedEmailJobTests 1✅ 173ms
TeachingRecordSystem.Core.Tests.Services.Certificates.CertificateGeneratorTests 1✅ 2s
TeachingRecordSystem.Core.Tests.Services.DqtOutbox.OutboxMessageHandlerTests 1✅ 4s
TeachingRecordSystem.Core.Tests.Services.Establishments.Gias.EstablishmentRefresherTests 2✅ 2s
TeachingRecordSystem.Core.Tests.Services.Establishments.Tps.TpsEstablishmentRefresherTests 10✅ 127ms
TeachingRecordSystem.Core.Tests.Services.PersonMatching.PersonMatchingServiceTests 40✅ 28s
TeachingRecordSystem.Core.Tests.Services.TrsDataSync.TrsDataSyncHelperTests 42✅ 1⚪ 35s
TeachingRecordSystem.Core.Tests.Services.TrsDataSync.TrsDataSyncServiceTests 3✅ 2s
TeachingRecordSystem.Core.Tests.Services.Webhooks.WebhookDeliveryServiceTests 6✅ 4s
TeachingRecordSystem.Core.Tests.Services.Webhooks.WebhookSenderTests 1✅ 1s
TeachingRecordSystem.Core.Tests.Services.WorkforceData.TpsCsvExtractFileImporterTests 25✅ 304ms
TeachingRecordSystem.Core.Tests.Services.WorkforceData.TpsCsvExtractProcessorTests 17✅ 10s
TeachingRecordSystem.Core.Tests.Services.WorkforceData.WorkforceDataExporterTests 1✅ 730ms

✅ TeachingRecordSystem.Core.Tests.ApiSchema.VNext.WebhookData.AlertCreatedNotificationMapperTests

✅ MapEventAsync_AlertIsInternalOnly_ReturnsNull
✅ MapEventAsync_AlertIsNotInternalOnly_ReturnsNotification

✅ TeachingRecordSystem.Core.Tests.ApiSchema.VNext.WebhookData.AlertDeletedNotificationMapperTests

✅ MapEventAsync_AlertIsInternalOnly_ReturnsNull
✅ MapEventAsync_AlertIsNotInternalOnly_ReturnsNotification

✅ TeachingRecordSystem.Core.Tests.ApiSchema.VNext.WebhookData.AlertUpdatedNotificationMapperTests

✅ MapEventAsync_AlertIsInternalOnly_ReturnsNull
✅ MapEventAsync_AlertIsNotInternalOnly_ReturnsNotification
✅ MapEventAsync_OnlyLinkIsChanged_ReturnsNull

✅ TeachingRecordSystem.Core.Tests.DataStore.Postgres.Models.MandatoryQualificationProviderTests

✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "10", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "100", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "110", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "120", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "130", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "140", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "150", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "160", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "170", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "180", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "190", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "20", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "200", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "210", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "220", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "230", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "240", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "30", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "40", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "50", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "60", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "70", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "80", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "90", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "950", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "951", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "952", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "953", expectedResult: False)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "954", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "955", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "956", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "957", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "958", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "959", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "960", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "961", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "962", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "963", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "964", expectedResult: True)
✅ TryMapFromDqtMqEstablishment_ReturnsExpectedResult(mqestablishmentValue: "965", expectedResult: True)

✅ TeachingRecordSystem.Core.Tests.DataStore.Postgres.Models.PersonTests

✅ SetCpdInductionStatus_PersonIsExemptAndNewStatusIsNotPassed_KeepsOverallStatusAsExempt(status: InProgress)
✅ SetCpdInductionStatus_PersonIsExemptAndNewStatusIsNotPassed_KeepsOverallStatusAsExempt(status: RequiredToComplete)
✅ SetCpdInductionStatus_PersonIsExemptAndNewStatusIsPassed_SetsOverallStatusToPassed
✅ SetCpdInductionStatus_SetsOverallStatusAndOutsEvent(status: InProgress)
✅ SetCpdInductionStatus_SetsOverallStatusAndOutsEvent(status: Passed)
✅ SetCpdInductionStatus_SetsOverallStatusAndOutsEvent(status: RequiredToComplete)

✅ TeachingRecordSystem.Core.Tests.EventInfoTests

✅ EventSerializesCorrectly
✅ EventWithDqtUserIdSerializesRaisedByCorrectly

✅ TeachingRecordSystem.Core.Tests.Jobs.BatchSendEytsAwardedEmailsJobTests

✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2022-05-23T00:00:00.0000000Z, previousJobLastAwardedToUtc: 2023-02-02T00:00:00.0000000Z, utcNow: 2023-02-06T08:00:00.0000000Z, startExpected: 2023-02-02T00:00:00.0000000Z, endExpected: 2023-02-03T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-02-02T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-02-06T08:00:00.0000000Z, startExpected: 2023-02-02T00:00:00.0000000Z, endExpected: 2023-02-03T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-03-26T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-03-30T08:00:00.0000000Z, startExpected: 2023-03-26T00:00:00.0000000Z, endExpected: 2023-03-27T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-04-01T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-04-05T08:00:00.0000000Z, startExpected: 2023-04-01T00:00:00.0000000Z, endExpected: 2023-04-02T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-10-29T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-11-02T08:00:00.0000000Z, startExpected: 2023-10-29T00:00:00.0000000Z, endExpected: 2023-10-30T00:00:00.0000000Z)
✅ Execute_WhenDoesNotHaveAwardeesForDateRange_UpdatesDatabaseOnly
✅ Execute_WhenEnqueueFails_DoesNotUpdateDatabase
✅ Execute_WhenHasAwardeesForDateRange_UpdatesDatabaseAndEnqueuesJobToSendEmail

✅ TeachingRecordSystem.Core.Tests.Jobs.BatchSendInductionCompletedEmailsJobTests

✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2022-05-23T00:00:00.0000000Z, previousJobLastAwardedToUtc: 2023-02-02T00:00:00.0000000Z, utcNow: 2023-02-06T08:00:00.0000000Z, startExpected: 2023-02-02T00:00:00.0000000Z, endExpected: 2023-02-03T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-02-02T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-02-06T08:00:00.0000000Z, startExpected: 2023-02-02T00:00:00.0000000Z, endExpected: 2023-02-03T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-03-26T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-03-30T08:00:00.0000000Z, startExpected: 2023-03-26T00:00:00.0000000Z, endExpected: 2023-03-27T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-04-01T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-04-05T08:00:00.0000000Z, startExpected: 2023-04-01T00:00:00.0000000Z, endExpected: 2023-04-02T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-10-29T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-11-02T08:00:00.0000000Z, startExpected: 2023-10-29T00:00:00.0000000Z, endExpected: 2023-10-30T00:00:00.0000000Z)
✅ Execute_WhenDoesNotHaveCompleteesForDateRange_UpdatesDatabaseOnly
✅ Execute_WhenEnqueueFails_DoesNotUpdateDatabase
✅ Execute_WhenHasCompleteesForDateRange_UpdatesDatabaseAndEnqueuesJobToSendEmail

✅ TeachingRecordSystem.Core.Tests.Jobs.BatchSendInternationalQtsAwardedEmailsJobTests

✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2022-05-23T00:00:00.0000000Z, previousJobLastAwardedToUtc: 2023-02-02T00:00:00.0000000Z, utcNow: 2023-02-06T08:00:00.0000000Z, startExpected: 2023-02-02T00:00:00.0000000Z, endExpected: 2023-02-03T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-02-02T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-02-06T08:00:00.0000000Z, startExpected: 2023-02-02T00:00:00.0000000Z, endExpected: 2023-02-03T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-03-26T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-03-30T08:00:00.0000000Z, startExpected: 2023-03-26T00:00:00.0000000Z, endExpected: 2023-03-27T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-04-01T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-04-05T08:00:00.0000000Z, startExpected: 2023-04-01T00:00:00.0000000Z, endExpected: 2023-04-02T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-10-29T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-11-02T08:00:00.0000000Z, startExpected: 2023-10-29T00:00:00.0000000Z, endExpected: 2023-10-30T00:00:00.0000000Z)
✅ Execute_WhenDoesNotHaveAwardeesForDateRange_UpdatesDatabaseOnly
✅ Execute_WhenEnqueueFails_DoesNotUpdateDatabase
✅ Execute_WhenHasAwardeesForDateRange_UpdatesDatabaseAndEnqueuesJobToSendEmail

✅ TeachingRecordSystem.Core.Tests.Jobs.BatchSendQtsAwardedEmailsJobTests

✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2022-05-23T00:00:00.0000000Z, previousJobLastAwardedToUtc: 2023-02-02T00:00:00.0000000Z, utcNow: 2023-02-06T08:00:00.0000000Z, startExpected: 2023-02-02T00:00:00.0000000Z, endExpected: 2023-02-03T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-02-02T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-02-06T08:00:00.0000000Z, startExpected: 2023-02-02T00:00:00.0000000Z, endExpected: 2023-02-03T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-03-26T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-03-30T08:00:00.0000000Z, startExpected: 2023-03-26T00:00:00.0000000Z, endExpected: 2023-03-27T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-04-01T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-04-05T08:00:00.0000000Z, startExpected: 2023-04-01T00:00:00.0000000Z, endExpected: 2023-04-02T00:00:00.0000000Z)
✅ Execute_ForMultipleScenarios_EvaluatesDateRangeCorrectly(initialLastAwardedToUtc: 2023-10-29T00:00:00.0000000Z, previousJobLastAwardedToUtc: null, utcNow: 2023-11-02T08:00:00.0000000Z, startExpected: 2023-10-29T00:00:00.0000000Z, endExpected: 2023-10-30T00:00:00.0000000Z)
✅ Execute_WhenDoesNotHaveAwardeesForDateRange_UpdatesDatabaseOnly
✅ Execute_WhenEnqueueFails_DoesNotUpdateDatabase
✅ Execute_WhenHasAwardeesForDateRange_UpdatesDatabaseAndEnqueuesJobToSendEmail

✅ TeachingRecordSystem.Core.Tests.Jobs.EytsAwardedEmailJobDispatcherTests

✅ Execute_WhenCalled_EnqueuesSendEmailJobForAllUnsentItems

✅ TeachingRecordSystem.Core.Tests.Jobs.InductionCompletedEmailJobDispatcherTests

✅ Execute_WhenCalled_EnqueuesSendEmailJobForAllUnsentItems

✅ TeachingRecordSystem.Core.Tests.Jobs.InternationalQtsAwardedEmailJobDispatcherTests

✅ Execute_WhenCalled_EnqueuesSendEmailJobForAllUnsentItems

✅ TeachingRecordSystem.Core.Tests.Jobs.QtsAwardedEmailJobDispatcherTests

✅ Execute_WhenCalled_EnqueuesSendEmailJobForAllUnsentItems

✅ TeachingRecordSystem.Core.Tests.Jobs.SendInductionCompletedEmailJobTests

✅ Execute_WhenCalled_GetsTrnTokenSendsEmailAddsEventAndUpdatesDatabase

✅ TeachingRecordSystem.Core.Tests.Jobs.SendInternationalQtsAwardedEmailJobTests

✅ Execute_WhenCalled_GetsTrnTokenSendsEmailAddsEventAndUpdatesDatabase

✅ TeachingRecordSystem.Core.Tests.Jobs.SendQtsAwardedEmailJobTests

✅ Execute_WhenCalled_GetsTrnTokenSendsEmailAddsEventAndUpdatesDatabase

✅ TeachingRecordSystem.Core.Tests.Services.Certificates.CertificateGeneratorTests

✅ GenerateCertificate_GetsTemplateFromBlobStorageAndSetFieldValuesAsExpected

✅ TeachingRecordSystem.Core.Tests.Services.DqtOutbox.OutboxMessageHandlerTests

✅ HandleOutboxMessage_ForTrnRequestMetadataMessage_AddsTrnRequestMetadataToDb

✅ TeachingRecordSystem.Core.Tests.Services.Establishments.Gias.EstablishmentRefresherTests

✅ RefreshEstablishments_WhenCalledForExistingUrn_UpdatesEstablishment
✅ RefreshEstablishments_WhenCalledforNewUrn_AddsNewEstablishments

✅ TeachingRecordSystem.Core.Tests.Services.Establishments.Tps.TpsEstablishmentRefresherTests

✅ ImportFile_WithRowData_InsertsRecordsAsExpected(scenarioData: TpsEstablishmentFileImportTestScenarioData { IsExpectedToBeImported = False, Row = TpsEstablishmentCsvRow { EmployersName = "Employers Name", EstablishmentCode = "1234", LaCode = "123", SchoolClosedDate = "1234", SchoolGiasName = "School Gias Name" } })
✅ ImportFile_WithRowData_InsertsRecordsAsExpected(scenarioData: TpsEstablishmentFileImportTestScenarioData { IsExpectedToBeImported = False, Row = TpsEstablishmentCsvRow { EmployersName = "Employers Name", EstablishmentCode = "1234", LaCode = "1234", SchoolClosedDate = "03/02/2023", SchoolGiasName = "School Gias Name" } })
✅ ImportFile_WithRowData_InsertsRecordsAsExpected(scenarioData: TpsEstablishmentFileImportTestScenarioData { IsExpectedToBeImported = False, Row = TpsEstablishmentCsvRow { EmployersName = "Employers Name", EstablishmentCode = "12345", LaCode = "123", SchoolClosedDate = "03/02/2023", SchoolGiasName = "School Gias Name" } })
✅ ImportFile_WithRowData_InsertsRecordsAsExpected(scenarioData: TpsEstablishmentFileImportTestScenarioData { IsExpectedToBeImported = True, Row = TpsEstablishmentCsvRow { EmployersName = "Employers Name", EstablishmentCode = "1234", LaCode = "123", SchoolClosedDate = "03/02/2023", SchoolGiasName = "School Gias Name" } })
✅ RefreshEstablishments_WithTpsEstablishments_UpdatesEstablishmentsAsExpected(scenarioData: TpsEstablishmentRefreshTestScenarioData { ExpectedEstablishmentName = "Employers Name 2", ExpectedLaName = "Hackney", IsExpectedToGenerateEstablishment = True, TpsEstablishments = [TpsEstablishment { EmployersName = "Employers Name 1", EstablishmentCode = "0000", LaCode = "204", SchoolClosedDate = 01/01/2023, SchoolGiasName = null, ··· }, TpsEstablishment { EmployersName = "Employers Name 2", EstablishmentCode = "0000", LaCode = "204", SchoolClosedDate = null, SchoolGiasName = null, ··· }] })
✅ RefreshEstablishments_WithTpsEstablishments_UpdatesEstablishmentsAsExpected(scenarioData: TpsEstablishmentRefreshTestScenarioData { ExpectedEstablishmentName = "Employers Name", ExpectedLaName = "Hackney", IsExpectedToGenerateEstablishment = True, TpsEstablishments = [TpsEstablishment { EmployersName = "Employers Name", EstablishmentCode = "0000", LaCode = "204", SchoolClosedDate = null, SchoolGiasName = null, ··· }] })
✅ RefreshEstablishments_WithTpsEstablishments_UpdatesEstablishmentsAsExpected(scenarioData: TpsEstablishmentRefreshTestScenarioData { ExpectedEstablishmentName = "Employers Name", ExpectedLaName = null, IsExpectedToGenerateEstablishment = True, TpsEstablishments = [TpsEstablishment { EmployersName = "Employers Name", EstablishmentCode = "0000", LaCode = "751", SchoolClosedDate = null, SchoolGiasName = "School Gias Name", ··· }] })
✅ RefreshEstablishments_WithTpsEstablishments_UpdatesEstablishmentsAsExpected(scenarioData: TpsEstablishmentRefreshTestScenarioData { ExpectedEstablishmentName = "Full and Part-Time Youth and Community Worker", ExpectedLaName = "City of London", IsExpectedToGenerateEstablishment = True, TpsEstablishments = [TpsEstablishment { EmployersName = "CORPORATION OF LONDON", EstablishmentCode = "0972", LaCode = "201", SchoolClosedDate = null, SchoolGiasName = null, ··· }] })
✅ RefreshEstablishments_WithTpsEstablishments_UpdatesEstablishmentsAsExpected(scenarioData: TpsEstablishmentRefreshTestScenarioData { ExpectedEstablishmentName = "Full and Part-Time Youth and Community Worker", ExpectedLaName = "Hackney", IsExpectedToGenerateEstablishment = True, TpsEstablishments = [TpsEstablishment { EmployersName = "Hackney", EstablishmentCode = "0972", LaCode = "204", SchoolClosedDate = null, SchoolGiasName = null, ··· }] })
✅ RefreshEstablishments_WithTpsEstablishments_UpdatesEstablishmentsAsExpected(scenarioData: TpsEstablishmentRefreshTestScenarioData { ExpectedEstablishmentName = null, ExpectedLaName = null, IsExpectedToGenerateEstablishment = False, TpsEstablishments = [TpsEstablishment { EmployersName = "Hackney", EstablishmentCode = "2654", LaCode = "204", SchoolClosedDate = null, SchoolGiasName = null, ··· }] })

✅ TeachingRecordSystem.Core.Tests.Services.PersonMatching.PersonMatchingServiceTests

✅ GetMatchedAttributes_ReturnsExpectedResults(usePersonNino: False)
✅ GetMatchedAttributes_ReturnsExpectedResults(usePersonNino: True)
✅ GetSuggestedMatches_ReturnsExpectedResults(usePersonNino: False)
✅ GetSuggestedMatches_ReturnsExpectedResults(usePersonNino: True)
✅ Match_ReturnsExpectedResult(nameOption: MatchesAlias, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: NotSpecified, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MatchesAlias, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: NotSpecified, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MatchesAlias, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MatchesAlias, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: SpecifiedButDifferent, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MatchesAlias, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: NotSpecified, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MatchesAlias, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MatchesAlias, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedButDifferent, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MatchesAlias, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedButDifferent, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: NotSpecified, trnOption: NotSpecified, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: NotSpecified, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: NotSpecified, trnOption: SpecifiedButDifferent, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: NotSpecified, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: SpecifiedButDifferent, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: NotSpecified, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedButDifferent, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedButDifferent, trnOption: NotSpecified, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedButDifferent, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MatchesPersonName, dateOfBirthOption: NotSpecifed, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedAndMatches, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: MultipleSpecifiedAndOneMatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: NotSpecified, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MultipleSpecifiedAndOneMatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: NotSpecified, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MultipleSpecifiedAndOneMatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MultipleSpecifiedAndOneMatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesEmploymentNino, trnOption: SpecifiedButDifferent, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MultipleSpecifiedAndOneMatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: NotSpecified, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MultipleSpecifiedAndOneMatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber, Trn])
✅ Match_ReturnsExpectedResult(nameOption: MultipleSpecifiedAndOneMatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedButDifferent, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, NationalInsuranceNumber])
✅ Match_ReturnsExpectedResult(nameOption: MultipleSpecifiedAndOneMatchesPersonName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedButDifferent, trnOption: SpecifiedAndMatches, expectMatch: True, expectedMatchedAttributes: [FullName, DateOfBirth, Trn])
✅ Match_ReturnsExpectedResult(nameOption: NoFullName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedAndMatches, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: NotSpecifed, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedAndMatchesPersonNino, trnOption: SpecifiedAndMatches, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: SpecifiedButDifferentFirstName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: NotSpecified, trnOption: NotSpecified, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: SpecifiedButDifferentLastName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: NotSpecified, trnOption: NotSpecified, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: SpecifiedButDifferentLastName, dateOfBirthOption: MatchesPersonDateOfBirth, nationalInsuranceNumberOption: SpecifiedButDifferent, trnOption: SpecifiedButDifferent, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_ReturnsExpectedResult(nameOption: SpecifiedButDifferentLastName, dateOfBirthOption: SpecifiedButDifferent, nationalInsuranceNumberOption: NotSpecified, trnOption: NotSpecified, expectMatch: False, expectedMatchedAttributes: null)
✅ Match_WithMultipleMatchingNames_ReturnsResult
✅ Match_WithMultipleMatchingResults_ReturnsNull

✅ TeachingRecordSystem.Core.Tests.Services.TrsDataSync.TrsDataSyncHelperTests

✅ DeleteRecordsAsync_WithPerson_RemovesRowFromDb
✅ SyncAlertAsync_NewRecord_WritesNewRowToDb(personAlreadySynced: False)
✅ SyncAlertAsync_NewRecord_WritesNewRowToDb(personAlreadySynced: True)
✅ SyncAlertAsync_SanctionCodeIsRedundant_IsNotWrittenToDb
✅ SyncAlertAsync_WithDeactivatedEvent_SetsDeletedOnAttribute
✅ SyncAlertAsync_WithDqtCreateAudit_CreatesExpectedEvents
✅ SyncAlertAsync_WithDqtDeactivatedAudit_CreatesExpectedEvent
✅ SyncAlertAsync_WithDqtReactivatedAudit_CreatesExpectedEvents
⚪ SyncAlertAsync_WithDqtUpdateAudit_CreatesExpectedEvents
✅ SyncAlertAsync_WithNoDqtAudit_CreatesExpectedEvents
✅ SyncAlertAsync_WithNoDqtCreateButWithUpdateAudits_CreatesExpectedEvents
✅ SyncEventsAsync_NewRecord_WritesNewRowToDb
✅ SyncInductionsAsync_WithContactOnlyInductionStatus_UpdatesPersonRecord(personAlreadySynced: False)
✅ SyncInductionsAsync_WithContactOnlyInductionStatus_UpdatesPersonRecord(personAlreadySynced: True)
✅ SyncInductionsAsync_WithDqtCreateAudit_CreatesExpectedEvents
✅ SyncInductionsAsync_WithDqtDeactivatedAudit_CreatesExpectedEvent
✅ SyncInductionsAsync_WithDqtReactivatedAudit_CreatesExpectedEvent
✅ SyncInductionsAsync_WithDqtUpdateAudit_CreatesExpectedEvents
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: Exempt, expectedTrsInductionStatus: Exempt)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: Fail, expectedTrsInductionStatus: Failed)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: FailedinWales, expectedTrsInductionStatus: FailedInWales)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: InductionExtended, expectedTrsInductionStatus: InProgress)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: InProgress, expectedTrsInductionStatus: InProgress)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: NotYetCompleted, expectedTrsInductionStatus: InProgress)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: Pass, expectedTrsInductionStatus: Passed)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: PassedinWales, expectedTrsInductionStatus: Exempt)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: False, dqtInductionStatus: RequiredtoComplete, expectedTrsInductionStatus: RequiredToComplete)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: Exempt, expectedTrsInductionStatus: Exempt)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: Fail, expectedTrsInductionStatus: Failed)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: FailedinWales, expectedTrsInductionStatus: FailedInWales)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: InductionExtended, expectedTrsInductionStatus: InProgress)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: InProgress, expectedTrsInductionStatus: InProgress)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: NotYetCompleted, expectedTrsInductionStatus: InProgress)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: Pass, expectedTrsInductionStatus: Passed)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: PassedinWales, expectedTrsInductionStatus: Exempt)
✅ SyncInductionsAsync_WithInduction_UpdatesPersonRecord(personAlreadySynced: True, dqtInductionStatus: RequiredtoComplete, expectedTrsInductionStatus: RequiredToComplete)
✅ SyncInductionsAsync_WithNoDqtAudit_CreatesExpectedEvents
✅ SyncInductionsAsync_WithNoDqtCreateButWithUpdateAudits_CreatesExpectedEvents
✅ SyncInductionsAsync_WithQtls_UpdatesPersonRecord
✅ SyncInductionsAsync_WithQtlsButNotExemptAndIgnoreInvalidSetToFalse_ThrowsException
✅ SyncPersonAsync_AlreadyHaveNewerVersion_DoesNotUpdateDatabase
✅ SyncPersonAsync_ExistingRecord_UpdatesExistingRowInDb
✅ SyncPersonAsync_NewRecord_WritesNewRowToDb

✅ TeachingRecordSystem.Core.Tests.Services.TrsDataSync.TrsDataSyncServiceTests

✅ Contact_DeletedRecord_DeletesPersonRecordFromDatabase
✅ Contact_NewRecord_WritesNewPersonRecordToDatabase
✅ Contact_UpdatedRecord_WritesUpdatedPersonRecordToDatabase

✅ TeachingRecordSystem.Core.Tests.Services.Webhooks.WebhookDeliveryServiceTests

✅ SendMessagesAsync_DoesNotSendMessageDueInFuture
✅ SendMessagesAsync_NoOutstandingMessages_ReturnsMoreRecordsFalse
✅ SendMessagesAsync_OutstandingMessages_ReturnsMoreRecordsTrue
✅ SendMessagesAsync_SenderFails_UpdatesDbWithDueTimeForRetry
✅ SendMessagesAsync_SenderFailsAndNoMoreRetriesAllowed_UpdatesDbWithNullDueTime
✅ SendMessagesAsync_SendsDueMessageAndUpdatesDb

✅ TeachingRecordSystem.Core.Tests.Services.Webhooks.WebhookSenderTests

✅ SendMessageAsync_SendsMessageWithExpectedContent

✅ TeachingRecordSystem.Core.Tests.Services.WorkforceData.TpsCsvExtractFileImporterTests

✅ CopyValidFormatDataToStaging_WithValidData_InsertsRecordWithExpectedResult
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = DateOfBirthIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "1234", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = DateOfBirthIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = null, DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = DateOfDeathIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "1234", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = EmploymentEndDateIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "1234", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = EmploymentEndDateIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = null, EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = EmploymentStartDateIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "1234", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = EmploymentStartDateIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = null, EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = EstablishmentNumberIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "12345", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = ExtractDateIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = ExtractDateIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = FullOrPartTimeIndicatorIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = FullOrPartTimeIndicatorIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = GenderIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = GenderIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = LocalAuthorityCodeIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = LocalAuthorityCodeIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = NationalInsuranceNumberIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = NationalInsuranceNumberIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = None, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = None, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = null, ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = None, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = null, EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = TrnIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = TrnIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ ImportFile_WithRowData_InsertsRecordWithExpectedResult(testScenarioData: TpsCsvExtractFileImportTestScenarioData { ExpectedResult = WithdrawlIndicatorIncorrectFormat, Row = TpsCsvExtractRowRaw { DateOfBirth = "01/01/1980", DateOfDeath = "01/02/2024", EmploymentEndDate = "03/05/2024", EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })

✅ TeachingRecordSystem.Core.Tests.Services.WorkforceData.TpsCsvExtractProcessorTests

✅ BackfillNinoAndPersonPostcodeInEmploymentHistory_WhenCalledWithPersonEmploymentRecordsWithoutNinoAndPersonPostcode_SetsNinoAndPersonPostcode
✅ ProcessEndedEmployments_WithLastKnownEmployedDateGreaterThanThreeMonthsBeforeLastExtractDate_SetsEndDateOnPersonEmploymentRecord
✅ ProcessNewEmploymentHistory_ForLaCodeAndEstablishmentNumberWithMultipleEstablishmentEntries_MatchesToTheMostOpenEstablishment
✅ ProcessNewEmploymentHistory_WhenCalledWithEndDateInTheFuture_SetsLastKnownEmployedDateToExtractDate
✅ ProcessNewEmploymentHistory_WhenCalledWithLastKnownEmployedDateOlderThanFiveMonths_SetsEndDate
✅ ProcessNewEmploymentHistory_WhenCalledWithNewEmploymentHistory_InsertsNewPersonEmploymentRecord
✅ ProcessNewEmploymentHistory_WhenCalledWithWithdrawalIndicatorSet_SetsEndDate
✅ ProcessNewEmploymentHistory_WithValidData_OnlyMatchesToLaCodeAndPostCodeForHigherEducationIfNoMatchOnLaCodeAndEstablishment
✅ ProcessNonMatchingEstablishments_WhenCalledWithEstablishmentsNotMatchingEstablishmentsInTrs_SetsResultToInvalidEstablishment
✅ ProcessNonMatchingTrns_WhenCalledWithTrnsNotMatchingPersonsInTrs_SetsResultToInvalidTrn
✅ ProcessUpdatedEmploymentHistory_WhenCalledWithEndDateInTheFuture_SetsLastKnownEmployedDateToExtractDate
✅ ProcessUpdatedEmploymentHistory_WhenCalledWithLastKnownEmployedDateOlderThanFiveMonths_SetsEndDate
✅ ProcessUpdatedEmploymentHistory_WhenCalledWithUpdatedEmploymentHistory_UpdatesPersonEmploymentRecord
✅ ProcessUpdatedEmploymentHistory_WhenCalledWithUpdatedEmploymentHistoryWithNoChanges_SetsResultToValidNoChanges
✅ ProcessUpdatedEmploymentHistory_WhenCalledWithWithdrawalIndicatorNowRemoved_ResetsEndDate
✅ ProcessUpdatedEmploymentHistory_WhenCalledWithWithdrawalIndicatorSet_SetsEndDate
✅ UpdateLatestEstablishmentVersions_WithEstablishmentChangingUrn_UpdatesPersonEmploymentRecord

✅ TeachingRecordSystem.Core.Tests.Services.WorkforceData.WorkforceDataExporterTests

✅ Export_WhenCalled_ExportsDataToParquetFileAndUploadsToGcs