public void Test1([DataSources] string context) { using (var db = GetDataContext(context)) { AreEqual(FixData, Types2.Where(_ => _.BigIntValue != 2), db.Types2.Where(_ => _.BigIntValue != 2)); } }
public void Test3([DataSources] string context) { using (var db = GetDataContext(context)) { AreEqual(FixData, Types2.Where(_ => (_.BoolValue ?? false) != true), db.Types2.Where(_ => _.BoolValue != true)); } }
public void Test2(string context) { using (var db = GetDataContext(context)) { AreEqual(FixData, Types2.Where(_ => !_.BoolValue.Value), db.Types2.Where(_ => !_.BoolValue.Value)); } }
public void Test4WithoutComparasionNullCheck([DataSources] string context) { using var _ = new CompareNullsAsValuesOption(false); using var db = GetDataContext(context); var bigintFilter = new long?[] { 2 }; AreEqual(FixData, Types2.Where(_ => !bigintFilter.Contains(_.BigIntValue) && _.BigIntValue != null), db.Types2.Where(_ => !bigintFilter.Contains(_.BigIntValue))); }
public void Test92([DataSources] string context) { using (var db = GetDataContext(context)) { var boolFilter = new bool? [] { true }; AreEqual(FixData, Types2.Where(_ => boolFilter.Contains(_.BoolValue) == true), db.Types2.Where(_ => boolFilter.Contains(_.BoolValue) == true)); } }
public void Test82([DataSources] string context) { using (var db = GetDataContext(context)) { var bigintFilter = new long?[] { 2 }; AreEqual(FixData, Types2.Where(_ => bigintFilter.Contains(_.BigIntValue) == true), db.Types2.Where(_ => bigintFilter.Contains(_.BigIntValue) == true)); } }
public void Test81(string context) { using (var db = GetDataContext(context)) { var bigintFilter = new Int64?[] { 2 }; AreEqual(FixData, Types2.Where(_ => bigintFilter.Contains(_.BigIntValue)), db.Types2.Where(_ => bigintFilter.Contains(_.BigIntValue))); } }
public void Test4WithoutComparasionNullCheck([DataSources] string context) { using (new WithoutComparisonNullCheck()) using (var db = GetDataContext(context)) { var bigintFilter = new long?[] { 2 }; AreEqual(FixData, Types2.Where(_ => !bigintFilter.Contains(_.BigIntValue) && _.BigIntValue != null), db.Types2.Where(_ => !bigintFilter.Contains(_.BigIntValue))); } }
public void CompareDate2([IncludeDataSources(TestProvNameDb2i.All)] string context) { var dt = Types2[3].DateTimeValue; using (var db = GetDataContext(context)) { var expected = Types2.Where(t => t.DateTimeValue.Value.Date > dt.Value.Date); var actual = db.Types2.Where(t => t.DateTimeValue.Value.Date > dt.Value.Date); AreEqual(expected, actual); } }
public void WhereDateTimeTest6(string context) { using (var db = GetDataContext(context)) { AreEqual( AdjustExpectedData(db, Types2 .Where(_ => _.DateTimeValue.Value.Date == new DateTime(2009, 9, 20).Date) .Select(_ => _)), db.Types2 .Where(_ => _.DateTimeValue.Value.Date == new DateTime(2009, 9, 20).Date) .Select(_ => _)); } }
public void WhereDateTimeTest4(string context) { using (var db = GetDataContext(context)) { AreEqual( Types2 .Where(_ => _.DateTimeValue == new DateTime(2009, 9, 27)) .Select(_ => _), db.Types2 .Where(_ => _.DateTimeValue == new DateTime(2009, 9, 27)) .Select(_ => _)); } }
public void WhereDateTimeTest4(string context) { using (var db = GetDataContext(context)) { AreEqual( Types2 .Where(x => x.DateTimeValue == new DateTime(2009, 9, 27, 09, 19, 29).AddMilliseconds(90)) .Select(x => x), db.Types2 .Where(x => x.DateTimeValue == new DateTime(2009, 9, 27, 09, 19, 29).AddMilliseconds(90)) .Select(x => x)); } }