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

Improvements to TouramentManager.ExtensionMethods #95

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

axunonb
Copy link
Member

@axunonb axunonb commented Aug 4, 2023

SetEntityExtensions:

  • Add tie-break rule handling for match points to MatchEntityExtensions. Use existing entries in MatchRuleEntity for configuration.
  • New Add() overloads to more easily add sets from a string (e.g. "25:20 25:19") - especially for unit tests

League.Models.MatchViewModels.EnterResultViewModel:

  • Remove code duplication in method MapEntityToFormFields: Sets are now added using a SetEntityExtensions method

Refactoring:

  • Replace class PointResultNullable with modified existing class PointResult
  • Move methods CalculateSetPoints and Overrule from SetEntity to SetEntityExtensions
  • Methods ToShortTimeString and ToLongTimeString of TimeSpanExtensions are implemented using TimeOnly
  • Rename (unused) CloneHelperExtensions to EntityCoreExtensions

Unit tests:

  • Add package FluentAssertions v6.11.0 to unit tests of solution
  • Added more unit tests to classes in TournamentManager.ExtensionMethods

SetEntityExtensions:
* Add tie-break rule handling for match points to MatchEntityExtensions. Use existing entries in MatchRuleEntity for configuration.
* New Add() overloads to more easily add sets from a string (e.g. "25:20 25:19") - especialy for unit tests

League.Models.MatchViewModels.EnterResultViewModel:
* Remove code duplication in method MapEntityToFormFields: Sets are now added using a SetEntityExtensions method

Refactoring:
* Replace class PointResultNullable with modified existing class PointResult
* Move methods CalculateSetPoints and Overrule from SetEntity to SetEntityExtensions
* Methods ToShortTimeString and ToLongTimeString of TimeSpanExtensions are implemented using TimeOnly
* Rename (unused) CloneHelperExtensions to EntityCoreExtensions

Unit tests:
* Add package FluentAssertions v6.11.0 to unit tests of solution
* Added more unit tests to classes in TournamentManager.ExtensionMethods
@axunonb axunonb merged commit 5276c69 into main Aug 4, 2023
@axunonb axunonb deleted the pr/tournamentmanager-ext branch August 4, 2023 21:13
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

Successfully merging this pull request may close these issues.

1 participant