public void TestNestedQuery() { var randomQuery = this.RandomQueryable(new Random(654321)); UnitTestHelpers.AssertThrows <ODataCompileException>(() => this.VerifyQuery(q => q.Where(a => randomQuery.Any(aa => aa.Int > a.Int)))); }
public void TestParseIntegerOverflow() { UnitTestHelpers.AssertThrows <OverflowException>(() => this.TestParseExpressionLanguage("Int lt 2147483648")); }
public void TestRowErrors() { UnitTestHelpers.AssertThrows <ArgumentException>(() => this.VerifyQuery((IQueryable <ODataEntity> q) => q.Where(r => r.Get <string>("NullableDouble") != "0"), q => q)); UnitTestHelpers.AssertThrows <ODataParseException>(() => this.VerifyQuery((IQueryable <ODataEntity> q) => q.Where(r => r.Get <int>("FakeInt") < 100), q => q)); }
public void TestArgumentValidation() { UnitTestHelpers.AssertThrows <ArgumentNullException>(() => QueryStringParser.ParseQueryString(null)); UnitTestHelpers.AssertThrows <ArgumentNullException>(() => HttpUtility.ParseQueryString(null)); }