Skip to content

Commit

Permalink
EES-5492 - renamed a lot of test classes and method names in response…
Browse files Browse the repository at this point in the history
… to PR comments!
  • Loading branch information
duncan-at-hiveit committed Oct 15, 2024
1 parent b7e1058 commit 93b5d5e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace GovUk.Education.ExploreEducationStatistics.Public.Data.Processor.Tests.Functions;

public abstract class ProcessInitialDataSetVersionFunctionTests(
public abstract class CompleteInitialDataSetVersionProcessingFunctionTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessorFunctionsIntegrationTest(fixture)
{
Expand All @@ -26,9 +26,9 @@ public abstract class ProcessInitialDataSetVersionFunctionTests(
TimePeriodsTable.ParquetFile
];

public class CompleteInitialDataSetVersionProcessingTests(
public class CompleteInitialDataSetVersionProcessingProcessingTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessInitialDataSetVersionFunctionTests(fixture)
: CompleteInitialDataSetVersionProcessingFunctionTests(fixture)
{
private const DataSetVersionImportStage Stage = DataSetVersionImportStage.Completing;

Expand All @@ -40,7 +40,7 @@ public async Task Success()
var dataSetVersionPathResolver = GetRequiredService<IDataSetVersionPathResolver>();
Directory.CreateDirectory(dataSetVersionPathResolver.DirectoryPath(dataSetVersion));

await CompleteProcessing(instanceId);
await CompleteInitialDataSetVersionProcessing(instanceId);

await using var publicDataDbContext = GetDbContext<PublicDataDbContext>();

Expand Down Expand Up @@ -68,7 +68,7 @@ public async Task DuckDbFileIsDeleted()
await File.Create(Path.Combine(directoryPath, filename)).DisposeAsync();
}

await CompleteProcessing(instanceId);
await CompleteInitialDataSetVersionProcessing(instanceId);

// Ensure the duck db database file is the only file that was deleted
AssertDataSetVersionDirectoryContainsOnlyFiles(dataSetVersion,
Expand All @@ -77,7 +77,7 @@ public async Task DuckDbFileIsDeleted()
.ToArray());
}

private async Task CompleteProcessing(Guid instanceId)
private async Task CompleteInitialDataSetVersionProcessing(Guid instanceId)
{
var function = GetRequiredService<CompleteInitialDataSetVersionProcessingFunction>();
await function.CompleteInitialDataSetVersionProcessing(instanceId, CancellationToken.None);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace GovUk.Education.ExploreEducationStatistics.Public.Data.Processor.Tests.Functions;

public abstract class ProcessCompletionOfNextDataSetVersionImportFunctionTests(
public abstract class ProcessCompletionOfNextDataSetVersionFunctionsTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessorFunctionsIntegrationTest(fixture)
{
Expand All @@ -34,7 +34,7 @@ public abstract class ProcessCompletionOfNextDataSetVersionImportFunctionTests(

public abstract class CreateChangesTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessCompletionOfNextDataSetVersionImportFunctionTests(fixture)
: ProcessCompletionOfNextDataSetVersionFunctionsTests(fixture)
{
protected const DataSetVersionImportStage Stage = DataSetVersionImportStage.CreatingChanges;

Expand Down Expand Up @@ -2992,7 +2992,7 @@ .. DataFixture.DefaultTimePeriodMeta()

public class UpdateFileStoragePathTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessCompletionOfNextDataSetVersionImportFunctionTests(fixture)
: ProcessCompletionOfNextDataSetVersionFunctionsTests(fixture)
{
private const DataSetVersionImportStage Stage = DataSetVersionImportStage.ManualMapping;

Expand Down Expand Up @@ -3047,7 +3047,7 @@ private async Task UpdateFileStoragePath(Guid instanceId)

public class CompleteNextDataSetVersionImportProcessingTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessCompletionOfNextDataSetVersionImportFunctionTests(fixture)
: ProcessCompletionOfNextDataSetVersionFunctionsTests(fixture)
{
private const DataSetVersionImportStage Stage = DataSetVersionImportStage.Completing;

Expand All @@ -3059,7 +3059,7 @@ public async Task Success()
var dataSetVersionPathResolver = GetRequiredService<IDataSetVersionPathResolver>();
Directory.CreateDirectory(dataSetVersionPathResolver.DirectoryPath(dataSetVersion));

await CompleteProcessing(instanceId);
await CompleteNextDataSetVersionImportProcessing(instanceId);

await using var publicDataDbContext = GetDbContext<PublicDataDbContext>();

Expand Down Expand Up @@ -3087,7 +3087,7 @@ public async Task DuckDbFileIsDeleted()
await File.Create(Path.Combine(directoryPath, filename)).DisposeAsync();
}

await CompleteProcessing(instanceId);
await CompleteNextDataSetVersionImportProcessing(instanceId);

// Ensure the duck db database file is the only file that was deleted
AssertDataSetVersionDirectoryContainsOnlyFiles(dataSetVersion,
Expand All @@ -3096,7 +3096,7 @@ public async Task DuckDbFileIsDeleted()
.ToArray());
}

private async Task CompleteProcessing(Guid instanceId)
private async Task CompleteNextDataSetVersionImportProcessing(Guid instanceId)
{
var function = GetRequiredService<ProcessCompletionOfNextDataSetVersionFunctions>();
await function.CompleteNextDataSetVersionImportProcessing(instanceId, CancellationToken.None);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace GovUk.Education.ExploreEducationStatistics.Public.Data.Processor.Tests.Functions;

public abstract class ProcessCompletionOfNextDataSetVersionImportOrchestrationTests
public abstract class ProcessCompletionOfNextDataSetVersionOrchestrationTests
{
public class ProcessCompletionOfNextDataSetVersionImportTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

namespace GovUk.Education.ExploreEducationStatistics.Public.Data.Processor.Tests.Functions;

public abstract class ProcessNextDataSetVersionMappingsFunctionTests(
public abstract class ProcessNextDataSetVersionMappingsFunctionsTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessorFunctionsIntegrationTest(fixture)
{
public abstract class CreateMappingsTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessNextDataSetVersionMappingsFunctionTests(fixture)
: ProcessNextDataSetVersionMappingsFunctionsTests(fixture)
{
protected const DataSetVersionImportStage Stage = DataSetVersionImportStage.CreatingMappings;

Expand Down Expand Up @@ -534,7 +534,7 @@ public async Task Success_Candidates()

public abstract class ApplyAutoMappingsTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessNextDataSetVersionMappingsFunctionTests(fixture)
: ProcessNextDataSetVersionMappingsFunctionsTests(fixture)
{
protected const DataSetVersionImportStage Stage = DataSetVersionImportStage.AutoMapping;

Expand Down Expand Up @@ -1673,7 +1673,7 @@ public async Task Complete_HasDeletedTimePeriods_MajorUpdate()

public class CompleteNextDataSetVersionMappingsMappingProcessingTests(
ProcessorFunctionsIntegrationTestFixture fixture)
: ProcessNextDataSetVersionMappingsFunctionTests(fixture)
: ProcessNextDataSetVersionMappingsFunctionsTests(fixture)
{
private const DataSetVersionImportStage Stage = DataSetVersionImportStage.ManualMapping;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task Success()
.Returns(Task.CompletedTask);
}

await ProcessNextDataSetVersion(mockOrchestrationContext.Object);
await ProcessNextDataSetVersionMappings(mockOrchestrationContext.Object);

VerifyAllMocks(mockOrchestrationContext);
}
Expand Down Expand Up @@ -63,12 +63,12 @@ public async Task ActivityFunctionThrowsException_CallsHandleFailureActivity()
null))
.Returns(Task.CompletedTask);

await ProcessNextDataSetVersion(mockOrchestrationContext.Object);
await ProcessNextDataSetVersionMappings(mockOrchestrationContext.Object);

VerifyAllMocks(mockOrchestrationContext);
}

private async Task ProcessNextDataSetVersion(TaskOrchestrationContext orchestrationContext)
private async Task ProcessNextDataSetVersionMappings(TaskOrchestrationContext orchestrationContext)
{
await ProcessNextDataSetVersionMappingsFunctionOrchestration.ProcessNextDataSetVersionMappings(
orchestrationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Verify location mapping changes
user waits until element contains xpath://table[@data-testid='mappable-table-region']/caption//strong[1]
... 1 mapped location %{WAIT_LONG}

Validate the row headings and its contents in the 'Regions' section(after mapping)
Validate the row headings and its contents in the 'Regions' section after mapping
user waits until h3 is visible Locations not found in new data set
user checks table column heading contains 1 1 Current data set
user checks table column heading contains 1 2 New data set
Expand All @@ -207,12 +207,12 @@ Validate the row headings and its contents in the 'Regions' section(after mappin

user clicks link Back

Validate the version status of location task
Validate the version status of location task is now complete
user waits until h3 is visible Draft version tasks
user waits until parent contains element testid:map-locations-task link:Map locations
user waits until parent contains element id:map-locations-task-status text:Complete
user waits until parent contains element testid:map-filters-task link:Map filters
user waits until parent contains element id:map-filters-task-status text:Complete
user waits until parent contains element id:map-filters-task-status text:Incomplete

User clicks on Map filters link
user clicks link Map filters
Expand Down Expand Up @@ -247,7 +247,7 @@ Verify filter mapping changes
user waits until element contains xpath://table[@data-testid='mappable-table-school_type']/caption//strong[1]
... 1 mapped filter option %{WAIT_LONG}

Validate the row headings and its contents in the 'filters options' section(after mapping)
Validate the row headings and its contents in the 'filters options' section after mapping
user waits until h3 is visible Filter options not found in new data set
user checks table column heading contains 1 1 Current data set
user checks table column heading contains 1 2 New data set
Expand Down

0 comments on commit 93b5d5e

Please sign in to comment.