We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug If the DataRowAttribute has a null parameters in it, Snapshooter will error trying to generate the snapshot name.
DataRowAttribute
null
To Reproduce Create a MS Test like so:
[DataTestMethod] [DataRow("str", null)] public void TestWithNull(string str, string? nullableStr) { var data = new { str, nullableStr }; Snapshoot.Match(data); }
This results in the following error:
Message: Test method Cli.Tests.InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders threw exception: System.NullReferenceException: Object reference not set to an instance of an object. Stack Trace: <>c.<GetMethodSnapshotName>b__6_0(Object d) SelectArrayIterator`2.MoveNext() String.Join(String separator, IEnumerable`1 values) MSTestSnapshotFullNameReader.GetMethodSnapshotName(MethodBase method) MSTestSnapshotFullNameReader.ReadSnapshotFullName() SnapshotFullNameResolver.ResolveSnapshotFullName(String snapshotName, String snapshotNameExtension) Snapshooter.ResolveSnapshotFullName(String snapshotName, SnapshotNameExtension snapshotNameExtension) Snapshot.FullName() Snapshot.Match(Object currentResult, Func`2 matchOptions) Snapshot.Match[T](T currentResult, Func`2 matchOptions)
Expected behavior Test to pass.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
If the
DataRowAttribute
has anull
parameters in it, Snapshooter will error trying to generate the snapshot name.To Reproduce
Create a MS Test like so:
This results in the following error:
Expected behavior
Test to pass.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: