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

Add AppendErrors method and update documentation/tests #125

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alnaimi-github
Copy link

This pull request introduces several changes to the ErrorOr library, focusing on adding new functionality, enhancing documentation, and updating tests. The most important changes include the addition of the AppendErrors method, new tests for this method, and updates to the documentation to reflect these changes.

New Functionality:

  • Added the AppendErrors method in ErrorOr.AggregationExtensions to allow appending additional errors to an existing ErrorOr result.
  • Introduced FromError and FromValue methods in ErrorOr to create instances from a list of errors or a value, respectively.

Documentation Updates:

  • Updated README.md to include information and examples for the new AppendErrors method. [1] [2] [3] [4]

Testing Enhancements:

  • Added comprehensive tests for the AppendErrors method in ErrorOr.AggregationExtensionsTests. These tests cover various scenarios, including handling null and empty arrays, appending multiple errors, and ensuring the method works with different data types.
  • Introduced a mock User class for testing purposes in ErrorOr.AggregationExtensionsTests.User.

Configuration File Changes:

  • Updated the ErrorOr.sln.DotSettings.user file with new unit test session entries.

These changes collectively enhance the functionality and robustness of the ErrorOr library while ensuring the documentation and tests are up-to-date.

- Added a new section in the `README.md` for the `AppendErrors` method.
- Introduced the `AppendErrors` method in `ErrorOr.AggregationExtensions.cs`.
- Added detailed XML documentation for the `AppendErrors` method.
- Added new tests in `ErrorOr.AggregationExtensionsTests.cs` for `AppendErrors`.
- Added a mock `User` class for testing purposes.
- Updated `ErrorOr.cs` with new static methods `FromError` and `FromValue`.
- Made minor namespace adjustments in `ErrorOr.InstantiationTests.cs`.
- Updated `ErrorOr.sln.DotSettings.user` with new unit test session entries.
- Removed a redundant link and added a new link for `AppendErrors` in the `README.md`.
- Added a placeholder for a code snippet in the `README.md`.
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