|
From: <joe...@us...> - 2003-01-21 18:16:16
|
Update of /cvsroot/nmock/nmock/test/NMock/Constraints
In directory sc8-pr-cvs1:/tmp/cvs-serv16434/test/NMock/Constraints
Modified Files:
ConstraintsTest.cs
Log Message:
PropertyIs can now support properties of properties.... eg "Name.FirstName.Length"
Index: ConstraintsTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/Constraints/ConstraintsTest.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ConstraintsTest.cs 21 Jan 2003 17:36:00 -0000 1.3
--- ConstraintsTest.cs 21 Jan 2003 18:16:13 -0000 1.4
***************
*** 258,261 ****
--- 258,270 ----
}
+ [Test]
+ public void PropertyIsWithNestedProperties()
+ {
+ ThingWithProps t = new ThingWithProps();
+
+ Assertion.Assert(new PropertyIs("MyProp.Length", 5).Eval(t));
+ Assertion.Assert(!new PropertyIs("MyProp.Length", 9).Eval(t));
+ }
+
class ThingWithProps
{
|