Beispiel #1
0
        public void AsPercentageOf_InvalidShortCases_ThrowsException(short i, short reference)
        {
            // arrange
            Action fail = () => i.AsPercentageOf(reference);

            // act + assert
            fail.Should().Throw <ArgumentException>();
        }
Beispiel #2
0
        public void AsPercentageOf_ShortCases_ReturnsExpectedResult(short i, short reference, PercentageType type, float expectedResult)
        {
            // act
            var result = i.AsPercentageOf(reference, type);

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