Пример #1
0
        public void CalculateSalaryByInflationRateAndYear_WhenValidYear__WhenSalary3000andRate0_3_Return3900AndLogMetotRun()
        {
            double expected = 3900;

            _mockRate.Setup(x => x.GetInflationRateByYear(It.IsAny <int>())).Returns(0.3);
            var actual = _salaryService.CalculateSalaryByInflationRateAndYear(2020, 3000);

            Assert.Equal <double>(expected, actual);
            _mockLog.Verify(x => x.LogWrite(It.IsAny <string>()), Times.Once());
        }