예제 #1
0
        public void AsPercentageOf_InvalidDecimalCases_ThrowsException(decimal i, decimal reference)
        {
            // arrange
            Action fail = () => i.AsPercentageOf(reference);

            // act + assert
            fail.Should().Throw <ArgumentException>();
        }
예제 #2
0
        public void AsPercentageOf_DecimalCases_ReturnsExpectedResult(decimal i, decimal reference, PercentageType type, decimal expectedResult)
        {
            // act
            var result = i.AsPercentageOf(reference, type);

            // assert
            result.Should().Be(expectedResult);
        }