Skip to content

Refresh workforce data with "most open" version of establishment #2293

Refresh workforce data with "most open" version of establishment

Refresh workforce data with "most open" version of establishment #2293

GitHub Actions / Core test results failed Mar 18, 2024 in 1s

161 passed, 1 failed and 0 skipped

Tests failed

❌ TeachingRecordSystem/tests/TeachingRecordSystem.Core.Tests/TestResults/_fv-az1149-441_2024-03-18_22_33_01.trx

162 tests were completed in 16s with 161 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
TeachingRecordSystem.Core.Tests.DataStore.Postgres.Models.MandatoryQualificationProviderTests 40✅ 7ms
TeachingRecordSystem.Core.Tests.EventInfoTests 2✅ 173ms
TeachingRecordSystem.Core.Tests.Events.Processing.PublishEventsBackgroundServiceTests 3✅ 76ms
TeachingRecordSystem.Core.Tests.Jobs.BatchSendEytsAwardedEmailsJobTests 8✅ 555ms
TeachingRecordSystem.Core.Tests.Jobs.BatchSendInductionCompletedEmailsJobTests 8✅ 543ms
TeachingRecordSystem.Core.Tests.Jobs.BatchSendInternationalQtsAwardedEmailsJobTests 8✅ 482ms
TeachingRecordSystem.Core.Tests.Jobs.BatchSendQtsAwardedEmailsJobTests 8✅ 467ms
TeachingRecordSystem.Core.Tests.Jobs.EytsAwardedEmailJobDispatcherTests 1✅ 64ms
TeachingRecordSystem.Core.Tests.Jobs.InductionCompletedEmailJobDispatcherTests 1✅ 59ms
TeachingRecordSystem.Core.Tests.Jobs.InternationalQtsAwardedEmailJobDispatcherTests 1✅ 49ms
TeachingRecordSystem.Core.Tests.Jobs.QtsAwardedEmailJobDispatcherTests 1✅ 43ms
TeachingRecordSystem.Core.Tests.Jobs.SendInductionCompletedEmailJobTests 1✅ 35ms
TeachingRecordSystem.Core.Tests.Jobs.SendInternationalQtsAwardedEmailJobTests 1✅ 99ms
TeachingRecordSystem.Core.Tests.Jobs.SendQtsAwardedEmailJobTests 1✅ 94ms
TeachingRecordSystem.Core.Tests.Services.Certificates.CertificateGeneratorTests 1✅ 2s
TeachingRecordSystem.Core.Tests.Services.Establishments.EstablishmentRefresherTests 2✅ 545ms
TeachingRecordSystem.Core.Tests.Services.PersonSearch.PersonSearchServiceTests 19✅ 3s
TeachingRecordSystem.Core.Tests.Services.TrsDataSync.TrsDataSyncHelperTests 20✅ 7s
TeachingRecordSystem.Core.Tests.Services.TrsDataSync.TrsDataSyncServiceTests 3✅ 521ms
TeachingRecordSystem.Core.Tests.Services.WorkforceData.TpsCsvExtractFileImporterTests 25✅ 1s
TeachingRecordSystem.Core.Tests.Services.WorkforceData.TpsCsvExtractProcessorTests 7✅ 1❌ 3s

✅ 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.EventInfoTests

✅ EventSerializesCorrectly
✅ EventWithDqtUserIdSerializesRaisedByCorrectly

✅ TeachingRecordSystem.Core.Tests.Events.Processing.PublishEventsBackgroundServiceTests

✅ PublishEvents_DoesNotPublishAlreadyPublishedEvent
✅ PublishEvents_EventObserverThrows_DoesNotThrow
✅ PublishEvents_PublishesUnpublishEventsAndSetsPublishedFlag

✅ 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.Establishments.EstablishmentRefresherTests

✅ RefreshEstablishments_WhenCalledForExistingUrn_UpdatesEstablishment
✅ RefreshEstablishments_WhenCalledforNewUrn_AddsNewEstablishments

✅ TeachingRecordSystem.Core.Tests.Services.PersonSearch.PersonSearchServiceTests

✅ Search_WithMatch_ReturnsResults(matchOnSynonym: False, matchOnNino: False)
✅ Search_WithMatch_ReturnsResults(matchOnSynonym: False, matchOnNino: True)
✅ Search_WithMatch_ReturnsResults(matchOnSynonym: True, matchOnNino: False)
✅ Search_WithMatch_ReturnsResults(matchOnSynonym: True, matchOnNino: True)
✅ Search_WithMatchForMultipleNames_ReturnsMultipleResults
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: False, hasDatesOfBirth: False, hasNino: False, hasTrn: True)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: False, hasDatesOfBirth: False, hasNino: True, hasTrn: False)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: False, hasDatesOfBirth: False, hasNino: True, hasTrn: True)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: False, hasDatesOfBirth: True, hasNino: False, hasTrn: False)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: False, hasDatesOfBirth: True, hasNino: False, hasTrn: True)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: False, hasDatesOfBirth: True, hasNino: True, hasTrn: False)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: False, hasDatesOfBirth: True, hasNino: True, hasTrn: True)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: True, hasDatesOfBirth: False, hasNino: False, hasTrn: False)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: True, hasDatesOfBirth: False, hasNino: False, hasTrn: True)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: True, hasDatesOfBirth: False, hasNino: True, hasTrn: False)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: True, hasDatesOfBirth: False, hasNino: True, hasTrn: True)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: True, hasDatesOfBirth: True, hasNino: False, hasTrn: False)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: True, hasDatesOfBirth: True, hasNino: False, hasTrn: True)
✅ Search_WithMissingParameters_ReturnsEmptyArray(hasNames: True, hasDatesOfBirth: True, hasNino: True, hasTrn: False)

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

✅ DeleteRecords_WithMq_RemovesRowFromDb
✅ DeleteRecords_WithPerson_RemovesRowFromDb
✅ SyncMandatoryQualification_AlreadyHaveNewerVersion_DoesNotUpdateDatabase
✅ SyncMandatoryQualification_ExistingRecord_UpdatesExistingRowInDb
✅ SyncMandatoryQualification_NewRecord_WritesNewRowToDb(personAlreadySynced: False)
✅ SyncMandatoryQualification_NewRecord_WritesNewRowToDb(personAlreadySynced: True)
✅ SyncMandatoryQualification_WithDeactivatedEvent_SetsDeletedOnAttribute
✅ SyncMandatoryQualification_WithDeletedAudit_CreatesExpectedEvent
✅ SyncMandatoryQualification_WithDeletedEvent_SetsDeletedOnAttribute
✅ SyncMandatoryQualification_WithDqtCreateAudit_CreatesExpectedEvents
✅ SyncMandatoryQualification_WithDqtDeactivatedAudit_CreatesExpectedEvent
✅ SyncMandatoryQualification_WithDqtReactivatedAudit_CreatesExpectedEvents
✅ SyncMandatoryQualification_WithDqtUpdateAudit_CreatesExpectedEvents
✅ SyncMandatoryQualification_WithNoDqtAudit_CreatesExpectedEvents
✅ SyncMandatoryQualification_WithNoDqtCreateButWithUpdateAudits_CreatesExpectedEvents
✅ SyncMandatoryQualification_WithTrsEventAttributeOnDqtCreateAudit_CreatesExpectedEvents
✅ SyncMandatoryQualification_WithTrsEventAttributeOnDqtUpdateAudit_CreatesExpectedEvents
✅ SyncPerson_AlreadyHaveNewerVersion_DoesNotUpdateDatabase
✅ SyncPerson_ExistingRecord_UpdatesExistingRowInDb
✅ SyncPerson_NewRecord_WritesNewRowToDb

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

✅ Contact_DeletedRecord_DeletesPersonRecordFromDatabase
✅ Contact_NewRecord_WritesNewPersonRecordToDatabase
✅ Contact_UpdatedRecord_WritesUpdatedPersonRecordToDatabase

✅ 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 = 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 = "01/02/2024", EmploymentEndDate = null, EmploymentStartDate = "03/02/2023", EstablishmentCode = "1234", ··· } })
✅ 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

✅ ProcessNewEmploymentHistory_ForLaCodeAndEstablishmentNumberWithMultipleEstablishmentEntries_MatchesToTheMostOpenEstablishment
✅ ProcessNewEmploymentHistory_WhenCalledWithNewEmploymentHistory_InsertsNewPersonEmploymentRecord
❌ ProcessNewEmploymentHistory_WithValidData_OnlyMatchesToLaCodeAndPostCodeForHigherEducationIfNoMatchOnLaCodeAndEstablishment
	Assert.Contains() Failure: Item not found in collection
	Collection: [ca35bdb6-3b88-444c-a2b3-1ea2deeb5555, e34d55fb-ebb0-41c8-927b-1adfac8435aa]
	Not found:  c2b38e37-98e2-48d6-90d3-846dee9f39ff
✅ ProcessNonMatchingEstablishments_WhenCalledWithEstablishmentsNotMatchingEstablishmentsInTrs_SetsResultToInvalidEstablishment
✅ ProcessNonMatchingTrns_WhenCalledWithTrnsNotMatchingPersonsInTrs_SetsResultToInvalidTrn
✅ ProcessUpdatedEmploymentHistory_WhenCalledWithUpdatedEmploymentHistory_UpdatesPersonEmploymentRecord
✅ ProcessUpdatedEmploymentHistory_WhenCalledWithUpdatedEmploymentHistoryWithNoChanges_SetsResultToValidNoChanges
✅ UpdateLatestEstablishmentVersions_WithEstablishmentChangingUrn_UpdatesPersonEmploymentRecord

Annotations

Check failure on line 169 in TeachingRecordSystem/tests/TeachingRecordSystem.Core.Tests/Services/WorkforceData/TpsCsvExtractProcessorTests.cs

See this annotation in the file changed.

@github-actions github-actions / Core test results

TeachingRecordSystem.Core.Tests.Services.WorkforceData.TpsCsvExtractProcessorTests ► ProcessNewEmploymentHistory_WithValidData_OnlyMatchesToLaCodeAndPostCodeForHigherEducationIfNoMatchOnLaCodeAndEstablishment

Failed test found in:
  TeachingRecordSystem/tests/TeachingRecordSystem.Core.Tests/TestResults/_fv-az1149-441_2024-03-18_22_33_01.trx
Error:
  Assert.Contains() Failure: Item not found in collection
  Collection: [ca35bdb6-3b88-444c-a2b3-1ea2deeb5555, e34d55fb-ebb0-41c8-927b-1adfac8435aa]
  Not found:  c2b38e37-98e2-48d6-90d3-846dee9f39ff
Raw output
Assert.Contains() Failure: Item not found in collection
Collection: [ca35bdb6-3b88-444c-a2b3-1ea2deeb5555, e34d55fb-ebb0-41c8-927b-1adfac8435aa]
Not found:  c2b38e37-98e2-48d6-90d3-846dee9f39ff
   at TeachingRecordSystem.Core.Tests.Services.WorkforceData.TpsCsvExtractProcessorTests.ProcessNewEmploymentHistory_WithValidData_OnlyMatchesToLaCodeAndPostCodeForHigherEducationIfNoMatchOnLaCodeAndEstablishment() in /home/runner/work/teaching-record-system/teaching-record-system/TeachingRecordSystem/tests/TeachingRecordSystem.Core.Tests/Services/WorkforceData/TpsCsvExtractProcessorTests.cs:line 169