public void AggregateTest()
 {
     QueryMethods.CommutativeAssociative();
     QueryMethods.AggregateCorrectness();
     QueryMethods.VisualizeAggregate();
     QueryMethods.MergeForAggregate();
 }
 public void PartitioningTest()
 {
     QueryMethods.Skip(); // TODO.
     QueryMethods.OrderByAndSkip();
     QueryMethods.Take();
     QueryMethods.OrderByAndSkipAndTake();
 }
 public void OrderingTest()
 {
     QueryMethods.OrderBy();
     QueryMethods.OrderByDescending();
     QueryMethods.OrderByAndThenBy();
     try
     {
         QueryMethods.OrderByAnonymousType();
         Assert.Fail();
     }
     catch (InvalidOperationException exception)
     {
         Trace.WriteLine(exception);
     }
     QueryMethods.OrderByAndOrderBy();
     try
     {
         QueryMethods.Reverse();
         Assert.Fail();
     }
     catch (NotSupportedException exception)
     {
         Trace.WriteLine(exception);
     }
 }
示例#4
0
 public void NavigationTest()
 {
     QueryMethods.ParentAndAncestors();
     QueryMethods.ChildElements();
     QueryMethods.ChildrenAndDescendants();
     QueryMethods.ResultObjects();
 }
 public void MergeTest()
 {
     QueryMethods.Except();
     QueryMethods.MergeForSelect();
     QueryMethods.MergeForTakeWhile();
     QueryMethods.MergeForOrderBy();
 }
 public void OrderingTest()
 {
     QueryMethods.AsOrdered();
     QueryMethods.AsUnordered();
     QueryMethods.OrderBy();
     QueryMethods.Correctness();
 }
示例#7
0
        public void ConversionTest()
        {
//#if NETFX
//            QueryMethods.CastPrimitive(new AdventureWorks());
//#else
//            try
//            {
//                QueryMethods.CastPrimitive(new AdventureWorks());
//                Assert.Fail();
//            }
//            catch (InvalidOperationException exception)
//            {
//                Trace.WriteLine(exception);
//            }
//#endif
//#if NETFX
//            try
//            {
//                QueryMethods.CastEntity(new AdventureWorks());
//                Assert.Fail();
//            }
//            catch (NotSupportedException exception)
//            {
//                Trace.WriteLine(exception);
//            }
//#else
//            QueryMethods.CastEntity(new AdventureWorks());
//#endif
            QueryMethods.AsEnumerableAsQueryable(new AdventureWorks());
            QueryMethods.SelectLocalEntity(new AdventureWorks());
        }
示例#8
0
 public void GenerationTest()
 {
     QueryMethods.DefaultIfEmptyEntity(new AdventureWorks());
     QueryMethods.DefaultIfEmptyPrimitive(new AdventureWorks());
     QueryMethods.DefaultIfEmptyWithDefaultEntity(new AdventureWorks());
     QueryMethods.DefaultIfEmptyWithDefaultPrimitive(new AdventureWorks());
 }
示例#9
0
        public void ConversionTest()
        {
#if NETFX
            QueryMethods.CastPrimitive(new AdventureWorks());
#else
            try
            {
                QueryMethods.CastPrimitive(new AdventureWorks());
                Assert.Fail();
            }
            catch (InvalidOperationException exception)
            {
                Trace.WriteLine(exception);
            }
#endif
#if NETFX
            try
            {
                QueryMethods.CastEntity(new AdventureWorks());
                Assert.Fail();
            }
            catch (NotSupportedException exception)
            {
                Trace.WriteLine(exception);
            }
#else
            QueryMethods.CastEntity(new AdventureWorks());
#endif
            QueryMethods.AsEnumerableAsQueryable(new AdventureWorks());
            QueryMethods.SelectLocalEntity(new AdventureWorks());
        }
示例#10
0
 public void MappingTest()
 {
     QueryMethods.Select(new AdventureWorks());
     QueryMethods.SelectWithStringConcat(new AdventureWorks());
     QueryMethods.SelectEntity(new AdventureWorks());
     QueryMethods.SelectAnonymousType(new AdventureWorks());
 }
示例#11
0
        public void QuantifiersTest()
        {
            QueryMethods.Any(new AdventureWorks());
            QueryMethods.AnyWithPredicate(new AdventureWorks());
            QueryMethods.AllWithPredicate(new AdventureWorks());
            QueryMethods.ContainsPrimitive(new AdventureWorks());
#if NETFX
            try
            {
                QueryMethods.ContainsEntity(new AdventureWorks());
                Assert.Fail();
            }
            catch (NotSupportedException exception)
            {
                Trace.WriteLine(exception);
            }
#else
            try
            {
                QueryMethods.ContainsEntity(new AdventureWorks());
                Assert.Fail();
            }
            catch (ArgumentException exception)
            {
                Trace.WriteLine(exception);
            }
#endif
            QueryMethods.AllNot(new AdventureWorks());
            QueryMethods.NotAny(new AdventureWorks());
        }
示例#12
0
 public void OrderingTest()
 {
     QueryMethods.OrderBy(new AdventureWorks());
     QueryMethods.OrderByDescending(new AdventureWorks());
     QueryMethods.OrderByAndThenBy(new AdventureWorks());
     try
     {
         QueryMethods.OrderByMultipleKeys(new AdventureWorks());
         Assert.Fail();
     }
     catch (InvalidOperationException exception)
     {
         Trace.WriteLine(exception);
     }
     QueryMethods.OrderByAndOrderBy(new AdventureWorks());
     try
     {
         QueryMethods.Reverse(new AdventureWorks());
         Assert.Fail();
     }
     catch (NotImplementedException exception)
     {
         Trace.WriteLine(exception);
     }
 }
示例#13
0
 public void PartitioningTest()
 {
     QueryMethods.Skip(new AdventureWorks());
     QueryMethods.OrderByAndSkip(new AdventureWorks());
     QueryMethods.Take(new AdventureWorks());
     QueryMethods.SkipAndTake(new AdventureWorks());
     try
     {
         QueryMethods.TakeWhile(new AdventureWorks());
         Assert.Fail();
     }
     catch (NotSupportedException exception)
     {
         Trace.WriteLine(exception);
     }
     try
     {
         QueryMethods.SkipWhile(new AdventureWorks());
         Assert.Fail();
     }
     catch (NotSupportedException exception)
     {
         Trace.WriteLine(exception);
     }
 }
示例#14
0
 public void ElementTest()
 {
     QueryMethods.First();
     QueryMethods.FirstOrDefault();
     try
     {
         QueryMethods.Last();
         Assert.Fail();
     }
     catch (NotSupportedException exception)
     {
         Trace.WriteLine(exception);
     }
     try
     {
         QueryMethods.LastOrDefault();
         Assert.Fail();
     }
     catch (NotSupportedException exception)
     {
         Trace.WriteLine(exception);
     }
     QueryMethods.Single();
     QueryMethods.SingleOrDefault();
 }
示例#15
0
 public void QuantifiersTest()
 {
     QueryMethods.Any();
     QueryMethods.AnyWithPredicate();
     QueryMethods.Contains();
     QueryMethods.AllNot();
     QueryMethods.NotAny();
 }
示例#16
0
 public void GroupingTest()
 {
     QueryMethods.GroupBy(); // TODO. N+!.
     QueryMethods.GroupByWithResultSelector();
     QueryMethods.GroupByAndSelect();
     QueryMethods.GroupByAndSelectMany();
     QueryMethods.GroupByMultipleKeys();
 }
示例#17
0
 public void GroupingTest()
 {
     QueryMethods.GroupBy(new AdventureWorks());
     QueryMethods.GroupByWithResultSelector(new AdventureWorks());
     QueryMethods.GroupByAndSelect(new AdventureWorks());
     QueryMethods.GroupByAndSelectMany(new AdventureWorks());
     QueryMethods.GroupByMultipleKeys(new AdventureWorks());
 }
示例#18
0
 public void AggregateTest()
 {
     QueryMethods.Count(new AdventureWorks());
     QueryMethods.LongCount(new AdventureWorks());
     QueryMethods.Max(new AdventureWorks());
     QueryMethods.Min(new AdventureWorks());
     QueryMethods.Average(new AdventureWorks());
     QueryMethods.Sum(new AdventureWorks());
 }
示例#19
0
        private static void ImportDiscoveries()
        {
            XDocument xmlData = XDocument.Load("../../../Resources/discoveries.xml");

            xmlData.Root.Elements().ToList().ForEach(discovery =>
            {
                QueryMethods.AddDiscovery(discovery);
            });
        }
示例#20
0
        private static void ImportStars()
        {
            XDocument xmlData = XDocument.Load("../../../Resources/stars.xml");

            xmlData.Root.Elements().ToList().ForEach(star =>
            {
                QueryMethods.AddStar(star);
            });
        }
示例#21
0
 public void QueryTest()
 {
     QueryMethods.OptInOutParallel();
     QueryMethods.QueryExpression();
     QueryMethods.ForEachForAll();
     QueryMethods.ForEachForAllTimeSpans();
     QueryMethods.VisualizeForEachForAll();
     QueryMethods.WhereSelect();
 }
示例#22
0
 public void ApplyTest()
 {
     QueryMethods.CrossApplyWithGroupByAndTake();
     QueryMethods.CrossApplyWithGroupJoinAndTake();
     QueryMethods.CrossApplyWithAssociationAndTake();
     QueryMethods.OuterApplyWithGroupByAndFirstOrDefault();     // TODO.N+1.
     QueryMethods.OuterApplyWithGroupJoinAndFirstOrDefault();   // TODO.N+1.
     QueryMethods.OuterApplyWithAssociationAndFirstOrDefault(); // TODO.N+1.
 }
示例#23
0
 public void AggregateTest()
 {
     QueryMethods.Count();
     QueryMethods.LongCount();
     QueryMethods.Max();
     QueryMethods.Min();
     QueryMethods.Average();
     QueryMethods.Sum();
 }
 public void QueryTest()
 {
     QueryMethods.Generation();
     QueryMethods.AsParallelAsSequential();
     QueryMethods.QueryExpression();
     QueryMethods.ForEachForAll();
     QueryMethods.RenderForEachForAllSpans();
     QueryMethods.VisualizeForEachForAll();
     QueryMethods.VisualizeWhereSelect();
 }
示例#25
0
 public void QuantifiersTest()
 {
     QueryMethods.ContainsEntity(new AdventureWorks());
     QueryMethods.ContainsPrimitive(new AdventureWorks());
     QueryMethods.Any(new AdventureWorks());
     QueryMethods.AnyWithPredicate(new AdventureWorks());
     QueryMethods.AllWithPredicate(new AdventureWorks());
     QueryMethods.AllNot(new AdventureWorks());
     QueryMethods.NotAny(new AdventureWorks());
 }
示例#26
0
 public void SetTest()
 {
     QueryMethods.Distinct();
     QueryMethods.DistinctWithGroupBy();
     QueryMethods.DistinctMultipleKeys();
     QueryMethods.DistinctMultipleKeysWithGroupBy();
     QueryMethods.DistinctWithGroupByAndSelectAndFirstOrDefault();
     QueryMethods.Intersect();
     QueryMethods.Except();
 }
示例#27
0
 public void FilteringTest()
 {
     QueryMethods.Where();
     QueryMethods.WhereWithOr();
     QueryMethods.WhereWithAnd();
     QueryMethods.WhereAndWhere();
     QueryMethods.WhereWithIs();
     QueryMethods.OfTypeWithEntiy();
     QueryMethods.OfTypeWithPromitive(); // TODO.
 }
 public void OrderingTest()
 {
     QueryMethods.SelectWithIndex();
     QueryMethods.AsOrdered();
     QueryMethods.AsUnordered();
     QueryMethods.OrderBy();
     QueryMethods.Correctness();
     QueryMethods.JoinAsUnordered();
     QueryMethods.MergeOptionForOrder();
 }
示例#29
0
 public void FilteringTest()
 {
     QueryMethods.Where(new AdventureWorks());
     QueryMethods.WhereWithOr(new AdventureWorks());
     QueryMethods.WhereWithAnd(new AdventureWorks());
     QueryMethods.WhereAndWhere(new AdventureWorks());
     QueryMethods.WhereWithIs(new AdventureWorks());
     QueryMethods.OfTypeEntity(new AdventureWorks());
     QueryMethods.OfTypePrimitive(new AdventureWorks());
 }
示例#30
0
        public void ApplyTest()
        {
            QueryMethods.CrossApplyWithGroupByAndTake(new AdventureWorks());
            QueryMethods.CrossApplyWithGroupJoinAndTake(new AdventureWorks());
#if NETFX
            QueryMethods.CrossApplyWithRelationshipAndTake(new AdventureWorks());
#endif
            QueryMethods.OuterApplyWithGroupByAndFirstOrDefault(new AdventureWorks());
            QueryMethods.OuterApplyWithGroupJoinAndFirstOrDefault(new AdventureWorks());
            QueryMethods.OuterApplyWithRelationshipAndFirstOrDefault(new AdventureWorks());
        }