Repository navigation
refactor: move logic from StudySessionsService to StudySessionsHelper - #55
Merged
Dejmenek merged 3 commits intoOct 27, 2025
Merged
Conversation
Introduced a new static class `StudySessionsHelper` in the `Flashcards.Helpers` namespace. This class includes two static methods: `GetNextBox` and `GetNextReviewDate`, which determine the next box number and review date based on the correctness of the answer and the current box number. The logic for these methods was previously implemented as private methods in the `StudySessionsService` class, which have now been removed. The `StudySessionsService` class has been updated to utilize the new helper methods, enhancing code organization and reusability.
Created a new `StudySessionsHelperTests.cs` file with unit tests for the `StudySessionsHelper` class, including methods to validate the next box and review date functionality. Removed outdated tests and helper methods from `StudySessionsServiceTests.cs`, indicating a refactor and a shift in focus for testing the service layer.
Dejmenek
deleted the
53-move-getnextbox-and-getnextreviewdate-to-a-helper-class
branch
October 27, 2025 14:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces a new helper class for managing study session logic and refactors existing service methods to utilize this helper. It also moves test methods from study sessions service to the helper class tests.
Changes
StudySessionsHelperTests.cs: Moved unit tests forGetNextBoxandGetNextReviewDatemethods fromStudySessionsServiceTests.cs.StudySessionsHelper.cs: Introduced a new class with static methods for calculating the next box and review date fromStudySessionsService.cs.StudySessionsService.cs: Refactored to useStudySessionsHelpermethods instead of private methods for box and review date calculations.