コード例 #1
0
		public void IfNotOnObjectWithValue()
		{
			var source = new { Property = 5 };

			Assert.AreEqual(null, source.IfNot(s => s.Property > 3));
			Assert.AreEqual(source, source.IfNot(s => s.Property > 6));
		}
コード例 #2
0
		public void IfNotOnObjectWithNull()
		{
			var source = new { Property = 5 };
			source = null;

			Assert.IsNull(source.IfNot(s => s.Property > 3));
			Assert.IsNull(source.IfNot(s => s.Property > 6));
		}