コード例 #1
0
        public void PercentOfTestDivideByZero()
        {
            // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            Action test = () => DecimalEx.PercentOf(0, 100);

            Assert.Throws <DivideByZeroException>(test);
        }
コード例 #2
0
        public void PercentOfTest2DivideByZero()
        {
            // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            Action test = () => DecimalEx.PercentOf(0, (Int64)100);

            test.ShouldThrow <DivideByZeroException>();
        }