tags:

views:

32

answers:

1

Which method should I use to assert that two lists contains the same objects with MSpec?

A: 

You could use the ShouldContainOnly(IEnumerable<T>) extension method.

So if you have 2 lists, listA and listB use:

listA.ShouldContainOnly(listB)
Sergi Papaseit