Esempio n. 1
0
        public async Task LongTest()
        {
            using (DataTypesContext context = await DataTypesContext.Create(this))
            {
                await context.CheckValues <long>((o, v) => o.Long = v,
                                                 0, long.MinValue, 1, -1, 2, 1 >> 40, -(1 >> 40));

                context.ExpectSerializationFailure <long>((o, v) => o.Long = v,
                                                          long.MaxValue);
            }
        }
Esempio n. 2
0
        public async Task DecimalTest()
        {
            using (DataTypesContext context = await DataTypesContext.Create(this))
            {
                await context.CheckValues <decimal>((o, v) => o.Decimal = v,
                                                    0.0M, 1.0M, 1.5M, 2.0M, -2.0M, 3.14e12M, -5.2222e-10M);

                context.ExpectSerializationFailure <decimal>((o, v) => o.Decimal = v,
                                                             decimal.MinValue, decimal.MaxValue);
            }
        }
Esempio n. 3
0
        public async Task ULongTest()
        {
            using (DataTypesContext context = await DataTypesContext.Create(this))
            {
                await context.CheckValues <ulong>((o, v) => o.ULong = v,
                                                  0, ulong.MinValue, 1, 2, 3, 10, 1 >> 40);

                context.ExpectSerializationFailure <ulong>((o, v) => o.ULong = v,
                                                           ulong.MaxValue);
            }
        }