🧪 [testing improvement] add tests for CalendarVersionFormat constructor and format method#35
Conversation
…or and format method Add unit tests for CalendarVersionFormat to ensure the constructor correctly sets the Pattern property and the Format method correctly represents CalendarVersion objects based on custom patterns. - Implement Constructor_WithPattern_SetsPatternProperty - Implement Format_WithValidPatterns_ReturnsExpectedStrings (Theory) - Implement Format_MissingDay_ThrowsInvalidOperationException - Implement Format_MissingMinor_ThrowsInvalidOperationException
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…ompilation error Add unit tests for CalendarVersionFormat to ensure the constructor correctly sets the Pattern property and the Format method correctly represents CalendarVersion objects based on custom patterns. Also fix a compilation error (CS0136) in CalendarVersion.cs where a variable 'parts' was being redeclared in a nested scope. - Implement CalendarVersionFormatTests - Fix variable shadowing in CalendarVersion.Parse
…-2374914600003663477
🎯 What: The testing gap addressed
This PR addresses the missing unit tests for the
CalendarVersionFormatclass, specifically its constructor and theFormatmethod.📊 Coverage: What scenarios are now tested
Patternproperty.Formatmethod correctly formatsCalendarVersionobjects for patterns like "YYYY.MM", "YY.MM.DD", "YYYY.MM.DD.Minor", and even custom separators like "YYYY-MM-DD".Formatmethod correctly throwsInvalidOperationExceptionwhen the pattern requires aDayorMinorversion component that is not provided in theCalendarVersionobject.✨ Result: The improvement in test coverage
The addition of
CalendarVersionFormatTests.csensures that custom formatting logic is reliable and handles edge cases appropriately, improving the overall stability of the CalendarVersioning library.PR created automatically by Jules for task 2374914600003663477 started by @tetri