Skip to content

名前付きタプルも複合型・匿名型と等値アサートしたい #14

@in-async

Description

@in-async

こういうの:

var actual = (AccountId: 123, Name: "John Smith");

// 同じ名前の付いた ValueTuple との比較。現在も成功する。
actual.AssertIs((AccountId: 123, Name: "John Smith");

// 違う名前の付いた ValueTuple との比較。現在は成功するが、失敗にしたい。
actual.AssertIs((Foo: 123, Bar: "John Smith");

// 名前のないタプルとの比較 。現在は成功するが、失敗にすべきか。
actual.AssertIs((123, "John Smith"));
actual.AssertIs(Tuple.Create(123, "John Smith"));

// 同じメンバー名を持つ匿名型との比較。成功にしたい。
actual.AssertIs(new { AccountId = 123, Name = "John Smith" });

要は、名前付きのタプルは複合型・匿名型と同じ扱いにしたい、という事。

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions