зеркало из https://github.com/VerifyTests/Verify.git
1.8 KiB
1.8 KiB
Named Tuples
Instances of named tuples can be verified.
Due to the use of ITuple, this approach is only available an net472+ and netcoreapp2.2+.
Given a method that returns a named tuple:
static (bool Member1, string Member2, string Member3) MethodWithNamedTuple() =>
(true, "A", "B");
Can be verified:
await VerifyTuple(() => MethodWithNamedTuple());
Resulting in:
{
Member1: true,
Member2: A,
Member3: B
}