Example #1
0
        public void DoubleParametrization([IncludeDataSources(TestProvName.AllSQLite)] string context)
        {
            var data = ClassRealTypes.Seed();

            using (var db = GetDataContext(context))
                using (var table = db.CreateLocalTable(data))
                {
                    var actual = (
                        from t1 in table
                        where t1.DoubleValue == double.MaxValue && t1.FloatValue == float.MaxValue
                        select t1
                        ).Concat(
                        from t1 in table
                        where t1.DoubleValue == double.MinValue && t1.FloatValue == float.MinValue
                        select t1
                        ).ToArray();

                    var expected = (
                        from t1 in data
                        where t1.DoubleValue == double.MaxValue && t1.FloatValue == float.MaxValue
                        select t1
                        ).Concat(
                        from t1 in data
                        where t1.DoubleValue == double.MinValue && t1.FloatValue == float.MinValue
                        select t1
                        );


                    AreEqualWithComparer(expected, actual);
                }
        }
Example #2
0
            public static ClassRealTypes[] Seed()
            {
                var result = new ClassRealTypes[]
                {
                    new ClassRealTypes {
                        Id = 1, DoubleValue = double.MaxValue, FloatValue = float.MaxValue,
                    },
                    new ClassRealTypes {
                        Id = 1, DoubleValue = double.MinValue, FloatValue = float.MinValue,
                    },
                };

                return(result);
            }