All I want to do here is check that my lambda expression query returns the list of Customers that I expect.
So I've:
- Got the actual result of the query as a list of type Customer (from IEnumerable)
- Created an expected list of type Customer
- Used CollectionAssert to check each list has the same collection of members
- But the test fails due to:
I'm confused. As far as I can see I'm simply comparing 2 lists of the same generic type. What am I missing? Spent about an hour on this trying various casts etc., so any help appreciated.
Thanks
P.S. I'm just playing about with lambdas, linq and unit testing generally, but this is really bugging me!