rename #1533
GitHub Actions / TeachingRecordSystem.Core.Tests test results
succeeded
Dec 31, 2024 in 0s
259 passed, 0 failed and 2 skipped
β Β TeachingRecordSystem/tests/TeachingRecordSystem.Core.Tests/TestResults/_fv-az1789-900_2024-12-31_10_26_21.trx
261 tests were completed in 99s with 259 passed, 0 failed and 2 skipped.
β Β 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
β
InductionManagedByCpd_ReturnsTrue(yearsSinceCompleted: -3, expected: False)
β
InductionManagedByCpd_ReturnsTrue(yearsSinceCompleted: -7, expected: True)
β
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)
β
TrySetWelshInductionStatus_StatusIsAlreadySetToHigherPriorityStatus_ReturnsFalse(passed: False, currentStatus: Exempt)
β
TrySetWelshInductionStatus_StatusIsAlreadySetToHigherPriorityStatus_ReturnsFalse(passed: False, currentStatus: Failed)
β
TrySetWelshInductionStatus_StatusIsAlreadySetToHigherPriorityStatus_ReturnsFalse(passed: False, currentStatus: InProgress)
β
TrySetWelshInductionStatus_StatusIsAlreadySetToHigherPriorityStatus_ReturnsFalse(passed: False, currentStatus: Passed)
β
TrySetWelshInductionStatus_StatusIsAlreadySetToHigherPriorityStatus_ReturnsFalse(passed: True, currentStatus: Exempt)
β
TrySetWelshInductionStatus_StatusIsAlreadySetToHigherPriorityStatus_ReturnsFalse(passed: True, currentStatus: Failed)
β
TrySetWelshInductionStatus_StatusIsAlreadySetToHigherPriorityStatus_ReturnsFalse(passed: True, currentStatus: InProgress)
β
TrySetWelshInductionStatus_StatusIsAlreadySetToHigherPriorityStatus_ReturnsFalse(passed: True, currentStatus: Passed)
β
TrySetWelshInductionStatus_StatusIsAtLowerPriorityStatus_UpdatesStatusAndReturnsTrue(passed: False, currentStatus: RequiredToComplete, expectedStatus: FailedInWales, expectedExemptionReasons: None)
β
TrySetWelshInductionStatus_StatusIsAtLowerPriorityStatus_UpdatesStatusAndReturnsTrue(passed: True, currentStatus: RequiredToComplete, expectedStatus: Exempt, expectedExemptionReasons: PassedInductionInWales)
β Β 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.Jobs.SyncAllInductionsFromCrmJobTests
βͺ SyncInductionsAsync_WithExistingDqtInduction_UpdatesPersonRecord
β Β 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_WithExistingDqtInduction_UpdatesPersonRecord
β
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
β
Induction_NewRecord_WritesUpdatedPersonRecordToDatabase(personAlreadySynced: False)
β
Induction_NewRecord_WritesUpdatedPersonRecordToDatabase(personAlreadySynced: True)
β
Induction_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
Loading