I'm rather proud to have produced this Linq assertion on my own:
bool assert1 = (from e in A
select B.Contains<T>(e, new TComparer()))
.All(x => x == true);
bool assert2 = (from e in B
select A.Contains<T>(e, new TComparer()))
.All(x => x == true);
Assert(assert1 && assert2);
This will check that A and B are equal by containing the same elements i.e. A ⊆ B and B ⊆ A.
Is there a prettier way of doing this?