-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve recurrence handling, remove restrictions (#627)
* Modified Constants.cs: - Deprecated `RecurrenceRestrictionType` and `RecurrenceEvaluationModeType` enums. Updated RecurrencePattern.cs: - Deprecated `RestrictionType` and `EvaluationMode` properties. - Set default for `RestrictionType`. Enhanced RecurrenceUtil: - Added new using directives. - Introduced `DefaultTimeout`. - Updated `GetOccurrences` with timeout logic. Refined RecurrencePatternEvaluator: - Removed `_maxIncrementCount` with connected logic in favor of `RecurrenceUtil.DefaultTimeout` - Improved XML documentation comments. Updated Calendar.cs: - Simplified `Load` method. - Deprecated certain properties and methods associated with `RestrictionType` and `EvaluationMode` - Removed obsolete `Evaluate` method. Enhanced RecurrenceTests.cs with more robust test cases: - Replaced `Assert.That` with `Assert.Multiple`. - Changed assertion for occurrences count. - Renamed test methods for clarity. - Added timeout settings and updated expected exceptions. - Adjusted test data and added comments. Corrected typos and improved formatting for better readability. Fixes #622 * Don't convert dt to `SystsemLocal` in `Calendar.GetOccurrences(IDateTime dt)` * Remove timeout handling and adjust related recurrence tests - Removed `SetupBeforeEachTest` and timeout settings from tests. - Re-introduced `_maxIncrementCount` in `RecurrencePatternEvaluator`. - Modified `GetDates` to use `_maxIncrementCount` for loop control. - Removed timeout handling from `RecurrenceUtil` class. * Refactor test names and update assertion message - Updated test method names to reflect checking for at least a defined number of occurrences. - Removed redundant summary comments to test methods for clarity. - Remove remaining mentions of "Timeout" * Change tests to check for exact number of occurrences * Secondly_DefinedNumberOfOccurrences_ShouldSucceed(), Minutely_DefinedNumberOfOccurrences_ShouldSucceed(), Hourly_DefinedNumberOfOccurrences_ShouldSucceed() assert exact number of occurences. * Updated test methods to dynamically generate expected occurrences using loops * Implemented changes from the code review
- Loading branch information
Showing
9 changed files
with
206 additions
and
279 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.