You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request adds comprehensive new unit tests to the Mockolate internal test suite, focusing on improved coverage and correctness for property, indexer, and method setup behaviors. The new tests verify correct handling of edge cases, such as type conversions, storage allocation, and scenario management, as well as ensuring that default and user setups interact as intended.
Property and Setup Management:
Added tests to ensure that default property setups do not overwrite user-defined setups and that user setups correctly overwrite defaults in MockRegistry and MockSetups.PropertySetups
Introduced tests verifying that the internal property snapshot table in MockRegistry is updated and preserved correctly during property setup operations, including array growth and scenario handling
Indexer and Method Setup Handling:
Added tests to ensure that indexer setups correctly handle unknown access types and improper type casting, and that storage allocation for indexer setups is managed correctly and efficiently
Added tests for method setups to ensure that querying for the latest or matching setup on empty storage returns null without exceptions (MockSetupsTests.MethodsTests.cs).
Type Conversion and Getter Logic:
Introduced tests to verify that property getter logic correctly handles type conversions, including returning stored values when requested as boxed supertypes and handling null references properly
Scenario Management:
Added tests ensuring that requesting a scenario with an empty or null name returns the root scenario bucket as expected (MockSetupsTests.cs).
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
coverageAdditional tests for edge cases or improvement of test coveragestate: releasedThe issue is released
1 participant
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.
This pull request adds comprehensive new unit tests to the Mockolate internal test suite, focusing on improved coverage and correctness for property, indexer, and method setup behaviors. The new tests verify correct handling of edge cases, such as type conversions, storage allocation, and scenario management, as well as ensuring that default and user setups interact as intended.
Property and Setup Management:
MockRegistryandMockSetups.PropertySetupsMockRegistryis updated and preserved correctly during property setup operations, including array growth and scenario handlingIndexer and Method Setup Handling:
MockSetupsTests.MethodsTests.cs).Type Conversion and Getter Logic:
Scenario Management:
MockSetupsTests.cs).