Skip to content

Commit

Permalink
DP-613: Clean up to match the selected coding convention
Browse files Browse the repository at this point in the history
  • Loading branch information
mareg committed Sep 23, 2024
1 parent 2e5d2bf commit 6aaf5b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ public class GetFormSectionQuestionsUseCaseTest(AutoMapperFixture mapperFixture)
private readonly Mock<IFormRepository> _repository = new();
private GetFormSectionQuestionsUseCase UseCase => new(_repository.Object, mapperFixture.Mapper);

private static int nextQuestionNumber = 0;
private static int _nextQuestionNumber;

private static int getQuestionNumber()
private static int GetQuestionNumber()
{
Interlocked.Increment(ref nextQuestionNumber);
Interlocked.Increment(ref _nextQuestionNumber);

return nextQuestionNumber;
return _nextQuestionNumber;
}

[Fact]
Expand Down Expand Up @@ -76,7 +76,7 @@ public async Task ItReturnsTheSectionWithQuestions()
Id = 1,
Guid = Guid.NewGuid(),
Caption = "Page caption",
Name = "_Section0" + getQuestionNumber(),
Name = "_Section0" + GetQuestionNumber(),
Title = "The financial information you will need.",
Description = "You will need to upload accounts or statements for your 2 most recent financial years. If you do not have 2 years, you can upload your most recent financial year. You will need to enter the financial year end date for the information you upload.",
Type = CO.CDP.OrganisationInformation.Persistence.Forms.FormQuestionType.NoInput,
Expand All @@ -91,7 +91,7 @@ public async Task ItReturnsTheSectionWithQuestions()
Id = 2,
Guid = Guid.NewGuid(),
Caption = "Page caption",
Name = "_Section0" + getQuestionNumber(),
Name = "_Section0" + GetQuestionNumber(),
Title = "Were your accounts audited?.",
Description = "",
Type = CO.CDP.OrganisationInformation.Persistence.Forms.FormQuestionType.YesOrNo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ namespace CO.CDP.OrganisationInformation.Persistence.Tests;

public class DatabaseShareCodeRepositoryTest(PostgreSqlFixture postgreSql) : IClassFixture<PostgreSqlFixture>
{
private static int nextQuestionNumber = 0;
private static int _nextQuestionNumber;

private static int getQuestionNumber()
private static int GetQuestionNumber()
{
Interlocked.Increment(ref nextQuestionNumber);
Interlocked.Increment(ref _nextQuestionNumber);

return nextQuestionNumber;
return _nextQuestionNumber;
}

[Fact]
Expand Down Expand Up @@ -275,7 +275,7 @@ private static FormQuestion GivenYesOrNoQuestion(FormSection section)
Section = section,
Type = FormQuestionType.YesOrNo,
IsRequired = true,
Name = "_Section0" + getQuestionNumber(),
Name = "_Section0" + GetQuestionNumber(),
Title = "Yes or no?",
Description = "Please answer.",
NextQuestion = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ namespace CO.CDP.OrganisationInformation.Persistence.Tests.Factories;

public static class SharedConsentFactory
{
private static int nextQuestionNumber = 0;
private static int _nextQuestionNumber;

private static int getQuestionNumber()
private static int GetQuestionNumber()
{
Interlocked.Increment(ref nextQuestionNumber);
Interlocked.Increment(ref _nextQuestionNumber);

return nextQuestionNumber;
return _nextQuestionNumber;
}

public static SharedConsent GivenSharedConsent(
Expand Down Expand Up @@ -96,7 +96,7 @@ public static FormQuestion GivenFormQuestion(
var question = new FormQuestion
{
Guid = questionId ?? Guid.NewGuid(),
Name = "_Section0" + getQuestionNumber(),
Name = "_Section0" + GetQuestionNumber(),
Title = "Were your accounts audited?",
Caption = "",
Description = "Please answer.",
Expand Down

0 comments on commit 6aaf5b3

Please sign in to comment.