本文整理汇总了C#中SearchCondition.IsSatisfiedBy方法的典型用法代码示例。如果您正苦于以下问题:C# SearchCondition.IsSatisfiedBy方法的具体用法?C# SearchCondition.IsSatisfiedBy怎么用?C# SearchCondition.IsSatisfiedBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchCondition
的用法示例。
在下文中一共展示了SearchCondition.IsSatisfiedBy方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test_IsSatisfiedBy_MoreThanOrEqualTo_Null
public void Test_IsSatisfiedBy_MoreThanOrEqualTo_Null()
{
var sc = new SearchCondition<int>();
//expect same behaviour as SQL
sc.MoreThanOrEqualTo(1);
Assert.IsFalse(sc.IsSatisfiedBy(null));
}
示例2: Test_IsSatisfiedBy_IsNotNull_Null
public void Test_IsSatisfiedBy_IsNotNull_Null()
{
var sc = new SearchCondition<object>();
//expect same behaviour as SQL
sc.IsNotNull();
Assert.IsFalse(sc.IsSatisfiedBy(null));
}
示例3: Test_IsSatisfiedBy_LessThan_Null
public void Test_IsSatisfiedBy_LessThan_Null()
{
var sc = new SearchCondition<int>();
//expect same behaviour as SQL
sc.LessThan(1);
Assert.IsFalse(sc.IsSatisfiedBy(null));
}
示例4: Test_IsSatisfiedBy_NotLike_Null
public void Test_IsSatisfiedBy_NotLike_Null()
{
var sc = new SearchCondition<string>();
var x = "x";
sc.NotLike(x);
// not implemented for Like
sc.IsSatisfiedBy(x);
}
示例5: Test_IsSatisfiedBy_NotIn_Null
public void Test_IsSatisfiedBy_NotIn_Null()
{
var sc = new SearchCondition<object>();
var x = new object();
var y = new object();
//expect same behaviour as SQL
sc.NotIn(new[] { x, y });
Assert.IsFalse(sc.IsSatisfiedBy(null));
}
示例6: Test_IsSatisfiedBy_MoreThanOrEqualTo
public void Test_IsSatisfiedBy_MoreThanOrEqualTo()
{
var sc = new SearchCondition<int>();
sc.MoreThanOrEqualTo(1);
Assert.IsFalse(sc.IsSatisfiedBy(0));
Assert.IsTrue(sc.IsSatisfiedBy(1));
Assert.IsTrue(sc.IsSatisfiedBy(2));
}
示例7: Test_IsSatisfiedBy_EqualTo_Null
public void Test_IsSatisfiedBy_EqualTo_Null()
{
var sc = new SearchCondition<object>();
var x = new object();
//expect same behaviour as SQL
sc.EqualTo(x);
Assert.IsFalse(sc.IsSatisfiedBy(null));
}
示例8: Test_IsSatisfiedBy_LessThan
public void Test_IsSatisfiedBy_LessThan()
{
var sc = new SearchCondition<int>();
sc.LessThan(1);
Assert.IsTrue(sc.IsSatisfiedBy(0));
Assert.IsFalse(sc.IsSatisfiedBy(1));
Assert.IsFalse(sc.IsSatisfiedBy(2));
}
示例9: Test_IsSatisfiedBy_Between
public void Test_IsSatisfiedBy_Between()
{
var sc = new SearchCondition<int>();
sc.Between(1, 3);
Assert.IsFalse(sc.IsSatisfiedBy(0));
Assert.IsTrue(sc.IsSatisfiedBy(1));
Assert.IsTrue(sc.IsSatisfiedBy(2));
Assert.IsTrue(sc.IsSatisfiedBy(3));
Assert.IsFalse(sc.IsSatisfiedBy(4));
}
示例10: Test_IsSatisfiedBy_IsNotNull
public void Test_IsSatisfiedBy_IsNotNull()
{
var sc = new SearchCondition<object>();
sc.IsNotNull();
Assert.IsFalse(sc.IsSatisfiedBy(null));
Assert.IsTrue(sc.IsSatisfiedBy(new object()));
}
示例11: Test_IsSatisfiedBy_NotIn
public void Test_IsSatisfiedBy_NotIn()
{
var sc = new SearchCondition<object>();
var x = new object();
var y = new object();
sc.NotIn(new[] { x, y });
Assert.IsFalse(sc.IsSatisfiedBy(x));
Assert.IsFalse(sc.IsSatisfiedBy(y));
Assert.IsTrue(sc.IsSatisfiedBy(new object()));
}
示例12: Test_IsSatisfiedBy_NotEqualTo
public void Test_IsSatisfiedBy_NotEqualTo()
{
var sc = new SearchCondition<object>();
var x = new object();
sc.NotEqualTo(x);
Assert.IsFalse(sc.IsSatisfiedBy(x));
Assert.IsTrue(sc.IsSatisfiedBy(new object()));
}