Ejemplo n.º 1
0
        public void ReIrrShouldCalculatedWithoutError(double[] cashFlow, double financeRate, double reInvestRate)
        {
            //Arrange
            var reIrr = new ReIrr();

            //Act
            var exception = Record.Exception(() => reIrr.ReinvestedInternalReturnRate(cashFlow, financeRate, reInvestRate));

            //Assert
            exception.Should().BeNull();
        }
Ejemplo n.º 2
0
        public void ReIrrShouldThrowDivideByZeroException(double[] cashFlow, double financeRate, double reInvestRate)
        {
            //Arrange
            var reIrr = new ReIrr();

            //Act
            var exception = Record.Exception(() => reIrr.ReinvestedInternalReturnRate(cashFlow, financeRate, reInvestRate));

            //Assert
            exception.Should().NotBeNull();
            exception.GetType().Should().Be(typeof(DivideByZeroException));
        }