public void Exists() { var data = new OmitIfNullData { Text = "foo", Number = 42 }; Assert.IsTrue(Matches(data, text.Exists(true))); Assert.IsFalse(Matches(data, text.Exists(false))); Assert.IsTrue(Matches(data, number.Exists(true))); Assert.IsFalse(Matches(data, number.Exists(false))); Assert.IsFalse(Matches(new OmitIfNullData(), text.Exists(true))); Assert.IsTrue(Matches(new OmitIfNullData(), text.Exists(false))); Assert.IsFalse(Matches(new OmitIfNullData(), number.Exists(true))); Assert.IsTrue(Matches(new OmitIfNullData(), number.Exists(false))); Assert.IsFalse(Matches(data, text_attribute.Exists(true))); Assert.IsTrue(Matches(data, text_attribute.Exists(false))); }
public void Exists () { var data = new OmitIfNullData { Text = "foo", Number = 42 }; Assert.IsTrue (Matches (data, text.Exists (true))); Assert.IsFalse (Matches (data, text.Exists (false))); Assert.IsTrue (Matches (data, number.Exists (true))); Assert.IsFalse (Matches (data, number.Exists (false))); Assert.IsFalse (Matches (new OmitIfNullData (), text.Exists (true))); Assert.IsTrue (Matches (new OmitIfNullData (), text.Exists (false))); Assert.IsFalse (Matches (new OmitIfNullData (), number.Exists (true))); Assert.IsTrue (Matches (new OmitIfNullData (), number.Exists (false))); Assert.IsFalse (Matches (data, text_attribute.Exists (true))); Assert.IsTrue (Matches (data, text_attribute.Exists (false))); }