Ejemplo n.º 1
0
 public void TranslatorShouldUseSpecialComparisonForNullableGuids()
 {
     this.TestBinary <Customer, bool>(BinaryOperatorKind.GreaterThanOrEqual, this.PropertyFromParameter("e", "NullableGuid1"), this.PropertyFromParameter("e", "NullableGuid2"), e => DataServiceProviderMethods.Compare(e.NullableGuid1, e.NullableGuid2) >= 0);
 }
Ejemplo n.º 2
0
 public void TranslatorShouldUseSpecialComparisonForBooleans()
 {
     this.TestBinary <bool, bool>(BinaryOperatorKind.GreaterThan, Constant(false), Parameter <bool>("b"), b => DataServiceProviderMethods.Compare(false, b) > 0);
     this.TestBinary <bool?, bool>(BinaryOperatorKind.LessThan, Parameter <bool?>("b"), Constant(true), b => DataServiceProviderMethods.Compare(b, true) < 0);
 }
Ejemplo n.º 3
0
 public void TranslatorShouldUseSpecialComparisonForStrings()
 {
     this.TestBinary <string, bool>(BinaryOperatorKind.GreaterThan, Parameter <string>("s"), Constant("foo"), s => DataServiceProviderMethods.Compare(s, "foo") > 0);
 }