Ejemplo n.º 1
0
        public void No_Arg_All_Values_Are_Between_Zero_And_MaxValue()
        {
            var decimals = new decimal[Assertion.Amount];

            for (var i = 0; i < Assertion.Amount; i++)
            {
                decimals[i] = DecimalProvider.Decimal();
            }

            decimals.AssertNotAllValuesAreTheSame();
            Assert.True(
                decimals.All(x => x >= 0 && x < decimal.MaxValue),
                "decimals.All(x => x >= 0 && x < decimal.MaxValue)"
                );
        }
Ejemplo n.º 2
0
        public void Inclusive_Min_Arg()
        {
            var decimals = new decimal[Assertion.Amount];

            const decimal arg = 100;

            for (var i = 0; i < Assertion.Amount; i++)
            {
                decimals[i] = DecimalProvider.Decimal(arg, arg);
            }

            Assert.True(
                decimals.All(x => x == arg),
                "decimals.All(x => x == arg)"
                );
        }
Ejemplo n.º 3
0
        public void All_Values_Are_Between_Zero_And_Max()
        {
            var decimals = new decimal[Assertion.Amount];

            const decimal max = 200;

            for (var i = 0; i < Assertion.Amount; i++)
            {
                decimals[i] = DecimalProvider.Decimal(max);
            }

            decimals.AssertNotAllValuesAreTheSame();
            Assert.True(
                decimals.All(x => x >= 0 && x < max),
                "decimals.All(x => x >= 0 && x < max)"
                );
        }
Ejemplo n.º 4
0
        public void Exclusive_Max_Arg()
        {
            var decimals = new decimal[Assertion.Amount];

            const decimal max = 100;
            const decimal min = max - MaxSupportedPrecision;

            for (var i = 0; i < Assertion.Amount; i++)
            {
                decimals[i] = DecimalProvider.Decimal(min, max);
            }

            decimals.AssertNotAllValuesAreTheSame();
            Assert.True(
                decimals.All(x => x < max),
                "decimals.All(x => x < max)"
                );
        }