Beispiel #1
0
        static int ProcessSalaryInput(string salary)
        {
            var inputValidation = decimal.TryParse(salary, out decimal income);

            if (inputValidation)
            {
                return(IntExtension.Rounding(income / 12M));
            }

            return(0);
        }
Beispiel #2
0
        public void Rounding_ShouldRoundDown_ReturnWholeNumber(decimal number, decimal output)
        {
            var result = IntExtension.Rounding(number);

            Assert.That(result, Is.EqualTo(output));
        }