Skip to content

Conversation

AtolagbeMuiz
Copy link
Contributor

This PR fixes IsSubset should return a better default AssertMessage #662

This implementation allows The CollectionAssert.IsSubsetOf default message to have more information regarding the message being returned. This message returns value(s) that is/are not a subset of a given superset.

Current Behaviour

Currently, The Message only says CollectionAssert.IsSubsetOf failed.

Expected Behaviour

With this Implementation, the message becomes more explanatory by giving more Information on what elements are missing in the collection. The message that will be returned is CollectionAssert.IsSubsetOf: values {"test1", "test2"} is/are not a subset of the superset

@Youssef1313 Youssef1313 requested a review from nohwnd August 11, 2025 19:41
@Youssef1313
Copy link
Member

Sorry for the delay on reviewing this @AtolagbeMuiz. We will try to get to it soon. Meanwhile, could you read the Contributor License Agreement (CLA), and if you agree with it, accept it, per the instructions in #6292 (comment)

@AtolagbeMuiz
Copy link
Contributor Author

Sorry for the delay on reviewing this @AtolagbeMuiz. We will try to get to it soon. Meanwhile, could you read the Contributor License Agreement (CLA), and if you agree with it, accept it, per the instructions in #6292 (comment)

Hi @Youssef1313 , I have read it already but I don’t know how I can agree to the License Agreement. I was expecting to see a button to press “Agree”.

Kindly, explain how I can do this. Thanks.

@Youssef1313
Copy link
Member

You need to add a comment in the PR with text @microsoft-github-policy-service agree or @microsoft-github-policy-service agree company="{your company}" (the two options are explained in #6292 (comment))

@AtolagbeMuiz
Copy link
Contributor Author

@microsoft-github-policy-service agree

@AtolagbeMuiz
Copy link
Contributor Author

AtolagbeMuiz commented Aug 20, 2025

@Youssef1313 please have you got idea while this build failed?? happened after i updated my branch to sync with main

@Youssef1313
Copy link
Member

Sometimes it's just flakiness. Usually we can restart the failing job and it will pass. We are working on improving the stability of our tests to avoid flakiness.

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

Overall, LGTM! Only few comments to address.

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

Thanks @AtolagbeMuiz.
One final thing to consider, it would be very great if you can add some unit tests to assert the message

…sage when a collection isn't a subset of the superset
@AtolagbeMuiz
Copy link
Contributor Author

Thanks @AtolagbeMuiz. One final thing to consider, it would be very great if you can add some unit tests to assert the message

This has now been done, and the PR updated. unit tests were written to assert the message

Copy link
Member

@nohwnd nohwnd left a comment

Choose a reason for hiding this comment

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

Hello, found few things that I would suggest revisiting. Please let me know if you have any concerns, or need to discuss it further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IsSubset should return a better default AssertMessage
3 participants