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

C# NUnit Framework can be cracked easily #3204

Closed
dgzargo opened this issue Apr 29, 2024 · 1 comment
Closed

C# NUnit Framework can be cracked easily #3204

dgzargo opened this issue Apr 29, 2024 · 1 comment

Comments

@dgzargo
Copy link

dgzargo commented Apr 29, 2024

It's applicable only for C# NUnit. Other environments may not.
This line makes you pass (almost) any test: NUnit.Framework.Assert.Pass();
See: https://www.codewars.com/kata/reviews/5d612414344de60001df1e50/groups/662ece960a3f2d0001193e20
It's the reproduction.

Generally, you are not supposed to pass katas with the same line of code.
So, it should not pass and be invalidated.

Way around for Kata developers:

Assert.DoesNotThrow<SuccessException>(() => KataTest());
@dgzargo dgzargo changed the title C# NUnit Framework can be cracked easily[short description of the bug] C# NUnit Framework can be cracked easily Apr 29, 2024
@hobovsky
Copy link

It's a duplicate of this issue #2179 (comment) and a couple of similar. I'm going to close this issue as a duplicate, but maybe it would be good to pick up some mentioned topics again, for example "[...] For banning specific code, we can create a community project for each language if the community is interested. [...]

@VanessaGreene VanessaGreene pinned this issue Apr 29, 2024
@VanessaGreene VanessaGreene unpinned this issue Apr 29, 2024
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

No branches or pull requests

2 participants