-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
StringExtensions Unit Tests #13657
StringExtensions Unit Tests #13657
Conversation
{ | ||
public class StringExtensionsTests | ||
{ | ||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use Theory
for both test cases 1 & 3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, using Theory
in test case 1 & 3.
{ | ||
[Theory] | ||
[InlineData(new byte[]{ 10, 20, 30 }, "0A141E")] | ||
public void ToHexString_ReturnsCorrectHexString(byte[] bytes, string expected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public void ToHexString_ReturnsCorrectHexString(byte[] bytes, string expected) | |
[InlineData(new byte[0], "")] | |
public void ToHexString_ReturnsCorrectHexString(byte[] bytes, string expected) |
Testing GitHub Copilot to generate Unit Tests.