Is there a way for asserting Tuples using Fluent Assertions?
var t1 = new Tuple<Guid, IEnumerable<Guid>>(Guid.Parse("{DA18B047-2F62-45F0-A437-748976B41D22}"),
new [] { Guid.Parse("{DA18B047-2F62-45F0-A437-748976B41D22}") });
var t2 = new Tuple<Guid, IEnumerable<Guid>>(Guid.Parse("{DA18B047-2F62-45F0-A437-748976B41D22}"),
new[] { Guid.Parse("{DA18B047-2F62-45F0-A437-748976B41D22}") });
This is asserted using either of the following:
t1.Should().ShouldBeEquivalentTo(t2);
t1.ShouldBeEquivalentTo(t2);
Results in:
Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException : Expected item[0] to be (da18b047-2f62-45f0-a437-748976b41d22, System.Collections.Generic.List`1[System.Guid]), but found (da18b047-2f62-45f0-a437-748976b41d22, System.Collections.Generic.List`1[System.Guid]).
Expected item[1] to be (119d681c-9171-4ecd-86b6-3b4417ad167c, System.Collections.Generic.List`1[System.Guid]), but found (119d681c-9171-4ecd-86b6-3b4417ad167c, System.Collections.Generic.List`1[System.Guid]).
I have also tried:
t1.Should().Be(t2);
Also, I am not to bothered about the order of Guids either.
Update
I am currently using 4.1.1 for this. Upgrading to 4.19.4 yields the same result.
I have also tried in v5 pre-release using:
t1.Should().BeEquivalentTo(t2);