Skip to content

Add support for Required and Optional fields in OptionObject and RowO…#296

Merged
scottolsonjr merged 4 commits intomainfrom
171-implement-setoptionalfield-and-setrequiredfield-methods
Mar 9, 2026
Merged

Add support for Required and Optional fields in OptionObject and RowO…#296
scottolsonjr merged 4 commits intomainfrom
171-implement-setoptionalfield-and-setrequiredfield-methods

Conversation

@scottolsonjr
Copy link
Contributor

Add support for Required and Optional fields in OptionObject and RowObject

  • Extended OptionObject, OptionObject2, and OptionObject2015 to handle Required and Optional fields.
  • Implemented SetRequiredField and SetOptionalField methods in FormObjectHelpers, OptionObjectHelpers, and RowObjectHelpers.
  • Added unit tests for Required and Optional field functionalities in OptionObject, OptionObject2, OptionObject2015, and RowObject.
  • Updated existing tests to include scenarios for Required and Optional fields.

…bject

- Extended OptionObject, OptionObject2, and OptionObject2015 to handle Required and Optional fields.
- Implemented SetRequiredField and SetOptionalField methods in FormObjectHelpers, OptionObjectHelpers, and RowObjectHelpers.
- Added unit tests for Required and Optional field functionalities in OptionObject, OptionObject2, OptionObject2015, and RowObject.
- Updated existing tests to include scenarios for Required and Optional fields.
@scottolsonjr scottolsonjr linked an issue Mar 8, 2026 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the *.Helpers extension method surface area to support marking FieldObject.Required as required/optional across RowObject, FormObject, and the various OptionObject* containers, with corresponding MSTest coverage updates.

Changes:

  • Added SetRequiredField(s) / SetOptionalField(s) helpers to RowObjectHelpers, FormObjectHelpers, and OptionObject*Helpers.
  • Updated helper test suites to include required/optional scenarios alongside existing enabled/locked/unlocked behaviors.
  • Added/expanded unit tests for required/optional behavior on RowObject, FormObject, and OptionObject*.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/RowObjectHelpers.cs Adds required/optional field mutation helpers on RowObject with RowAction updates.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/FormObjectHelpers.cs Adds required/optional helpers on FormObject including multi-iteration behavior across rows.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObjectHelpers.cs Adds required/optional helpers on OptionObject that delegate into FormObject helpers.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObject2Helpers.cs Adds required/optional helpers on OptionObject2.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObject2015Helpers.cs Adds required/optional helpers on OptionObject2015.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/RowObjectHelpersTests.cs Extends row helper tests for required/optional and adds new required/optional test cases.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/FormObjectHelpersTests.cs Adds multi-iteration tests for required/optional operations.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/OptionObjectHelpers.OptionObject.Tests.cs Adds required/optional cases and coverage for OptionObject.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/OptionObjectHelpers.OptionObject2.Tests.cs Adds required/optional cases and coverage for OptionObject2.
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/OptionObjectHelpers.OptionObject2015.Tests.cs Adds required/optional cases and coverage for OptionObject2015.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

@scottolsonjr scottolsonjr merged commit 8be8c18 into main Mar 9, 2026
7 checks passed
@scottolsonjr scottolsonjr deleted the 171-implement-setoptionalfield-and-setrequiredfield-methods branch March 9, 2026 00:59
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.

Implement SetOptionalField and SetRequiredField Methods

2 participants