public void HasTests_Docs() { HasAB o = new HasAB(1, 2); var result1 = R.Has("A")(o); var result2 = R.Has <HasAB>("B")(o); var result3 = R.Has("C")(o); Assert.IsTrue(result1); Assert.IsTrue(result2); Assert.IsFalse(result3); }
public void PropTests_Docs_Typed() { HasAB obj = new HasAB(1, 9); Assert.AreEqual( R.Prop <int>("A")(obj), 1 ); Assert.AreEqual( R.Prop <int>("B")(obj), 9 ); Assert.AreEqual(R.Prop <int>("C")(obj), default); }