Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve maintainability of dotnet tests #896

Open
laingsimon opened this issue Jun 13, 2024 · 1 comment
Open

Improve maintainability of dotnet tests #896

laingsimon opened this issue Jun 13, 2024 · 1 comment
Milestone

Comments

@laingsimon
Copy link
Owner

laingsimon commented Jun 13, 2024

Some test fixtures are very long, due to complex setup; review if these can be simplified to reduce difficulties in maintaining the codebase.

  • Introduce helpers/builders?
  • Split up test fixtures into sub-fixtures

Fixtures with 500+ lines:

File Lines
UpdateScoresCommandTests.cs 681
DivisionDataDtoFactoryTests.cs 664
SeasonTemplateServiceTests.cs 642
DivisionServiceTests.cs 637
GameAdapterTests.cs 636
RequestedDivisionOnlyReportTests.cs 633
FinalsNightReportTests.cs 624
AddOrUpdateTeamCommandTests.cs 623
GameServiceTests.cs 610
DivisionFixtureAdapterTests.cs 559
DivisionDataGameVisitorTests.cs 557
DivisionFixtureDateAdapterTests.cs 542
DataServiceTests.cs 541
TemplateToHealthCheckAdapterTests.cs 509
WatchableDataDtoAdapterTests.cs 508
UserServiceTests.cs 508
FixtureDateAssignmentStrategyTests.cs 502
@laingsimon
Copy link
Owner Author

laingsimon commented Jun 13, 2024

 get-childitem -recurse | where-object { $_.Name.EndsWith(".cs") -and $_.FullName.Contains("Tests") } | select-object @{ label='name'; expression={$_.name} }, @{ label='lines'; expression={(Get-Content $_.FullName | Measure-Object -Line).Lines} } | where-object { $_.lines -gt 500 } | sort-object -descending -property 'lines' | select-object { "| $($_.name) | $($_.lines) |" }

@laingsimon laingsimon added this to the v2.1.0 milestone Jun 17, 2024
@laingsimon laingsimon modified the milestones: v2.1.0, v2.1.1, v2.1.2 Jun 17, 2024
@laingsimon laingsimon modified the milestones: v2.1.2, v2.1.3 Jun 19, 2024
@laingsimon laingsimon mentioned this issue Jun 19, 2024
@laingsimon laingsimon modified the milestones: v2.1.3, v2.1.4 Jun 24, 2024
laingsimon added a commit that referenced this issue Jun 26, 2024
@laingsimon laingsimon mentioned this issue Jun 27, 2024
@laingsimon laingsimon modified the milestones: v2.1.4, v2.1.5 Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant