Esempio n. 1
0
        public void SalaryInput_Correct()
        {
            _consoleWrapper.Setup(c => c.ReadLine()).Returns("2400");
            _taxCalculator.Setup(t => t.ApplyIncomeTax(It.IsAny <int>())).Returns(2160);
            _taxCalculator.Setup(t => t.ApplySocialTax(It.IsAny <int>())).Returns(1836);
            var person = new Person();

            _displayer = new Displayer(_nameGenerator.Object, _taxCalculator.Object, _consoleWrapper.Object);

            _displayer.SalarySetter(person);

            Assert.AreEqual(1836, person.Salary);
        }