コード例 #1
0
        public void IsInRangeUShort_ConditionIsAboveMaximum_ShouldThrowAssertFailedException()
        {
            ushort condition = 20;
            ushort minimum   = 5;
            ushort maximum   = 15;

            Assert.ThrowsException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #2
0
        public void IsInRangeUShort_ConditionIsInRange_ShouldNotThrowAssertFailedException()
        {
            ushort condition = 10;
            ushort minimum   = 5;
            ushort maximum   = 15;

            ExceptionAsserter.DoesNotThrowException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #3
0
        public void IsInRangeULong_ConditionIsBelowMinimum_ShouldThrowAssertFailedException()
        {
            ulong condition = 2;
            ulong minimum   = 5;
            ulong maximum   = 15;

            Assert.ThrowsException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #4
0
        public void IsInRangeULong_ConditionIsMaximum_ShouldNotThrowAssertFailedException()
        {
            ulong condition = 15;
            ulong minimum   = 5;
            ulong maximum   = condition;

            ExceptionAsserter.DoesNotThrowException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #5
0
        public void IsInRangeSByte_ConditionIsInRange_ShouldNotThrowAssertFailedException()
        {
            sbyte condition = 10;
            sbyte minimum   = 5;
            sbyte maximum   = 15;

            ExceptionAsserter.DoesNotThrowException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #6
0
        public void IsInRangeLong_ConditionIsAboveMaximum_ShouldThrowAssertFailedException()
        {
            long condition = 20;
            long minimum   = 5;
            long maximum   = 15;

            Assert.ThrowsException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #7
0
        public void IsInRangeInt_ConditionIsMaximum_ShouldNotThrowAssertFailedException()
        {
            int condition = 15;
            int minimum   = 5;
            int maximum   = condition;

            ExceptionAsserter.DoesNotThrowException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #8
0
        public void IsInRangeSByte_ConditionIsAboveMaximum_ShouldThrowAssertFailedException()
        {
            sbyte condition = 20;
            sbyte minimum   = 5;
            sbyte maximum   = 15;

            Assert.ThrowsException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #9
0
        public void IsInRangeInt_ConditionIsBelowMinimum_ShouldThrowAssertFailedException()
        {
            int condition = 2;
            int minimum   = 5;
            int maximum   = 15;

            Assert.ThrowsException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #10
0
        public void IsInRangeByte_ConditionIsBelowMinimum_ShouldThrowAssertFailedException()
        {
            byte condition = 2;
            byte minimum   = 5;
            byte maximum   = 15;

            Assert.ThrowsException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #11
0
        public void IsInRangeDouble_ConditionIsMinimum_ShouldNotThrowAssertFailedException()
        {
            double condition = 5;
            double minimum   = condition;
            double maximum   = 15;

            ExceptionAsserter.DoesNotThrowException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #12
0
        public void IsInRangeDecimal_ConditionIsInRange_ShouldNotThrowAssertFailedException()
        {
            decimal condition = 10;
            decimal minimum   = 5;
            decimal maximum   = 15;

            ExceptionAsserter.DoesNotThrowException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }
コード例 #13
0
        public void IsInRangeDecimal_ConditionIsAboveMaximum_ShouldThrowAssertFailedException()
        {
            decimal condition = 20;
            decimal minimum   = 5;
            decimal maximum   = 15;

            Assert.ThrowsException <AssertFailedException>(
                () =>
            {
                Asserter.IsInRange(condition, minimum, maximum);
            });
        }