Hi aner,
Is Cars a field or a property? If it is a property you can replace it with an alternate list for the purpose of this test:
var underTest = new Dealer();
Isolate.WhenCalled(() => underTest.Cars).WillReturn(
new List {new Car { MeanPrice = 20, Name = "a" }, new Car { MeanPrice = 10, Name = "b" }});
var result = underTest. GetCarsOrderedByMeanPrice();
Assert.AreEqual("b", result[0].Name);
Assert.AreEqual("a", result[1].Name);
Please let me know if this helps.
Thanks,
Doron
Typemock support