This project is read-only.

How to chain multiple "ValueOf"

May 19, 2011 at 11:45 AM


i want to check a result object of a function, if its of the right type and if its properties are filled correctly.

Following code does not work, because the type information seems to get lost in "Prop1.Should()"


My actual workaround is to use LINQ via "Satisfy()", but is it possible to keep the fluent style?
May 21, 2011 at 5:45 PM

I prefer to use a line per each value... the test looks more clear to understand.

Jan 22, 2013 at 8:45 AM

I've had a similar problem, but mu "solution" is to do the following:

var isResultObject = GetResult().Should().Be.InstanceOf<ResultObject>();
I don't really like have the same assertion multiple times, so this way, I'm asserting one property at a time.