コード例 #1
0
        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))));
        }
コード例 #2
0
 public void TestParseIntegerOverflow()
 {
     UnitTestHelpers.AssertThrows <OverflowException>(() => this.TestParseExpressionLanguage("Int lt 2147483648"));
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 public void TestArgumentValidation()
 {
     UnitTestHelpers.AssertThrows <ArgumentNullException>(() => QueryStringParser.ParseQueryString(null));
     UnitTestHelpers.AssertThrows <ArgumentNullException>(() => HttpUtility.ParseQueryString(null));
 }