Пример #1
0
        public void calculate()
        {
            var sut    = new CalculateChanges();
            var result = sut.calculate(1000, 650);

            Assert.Equal(350, result.Change);
        }
Пример #2
0
        public void Calculate(int pay, int amount, int expChange, int exp1000, int exp500, int exp100, int exp50, int exp20, int exp5, int exp1)
        {
            var sut    = new CalculateChanges();
            var result = sut.calculate(pay, amount);

            Assert.Equal(expChange, result.Change);
            Assert.Equal(exp1000, result.Thounsand);
            Assert.Equal(exp500, result.FiveHundred);
            Assert.Equal(exp100, result.OneHundred);
            Assert.Equal(exp50, result.Fifty);
            Assert.Equal(exp20, result.Twenty);
            Assert.Equal(exp5, result.Five);
            Assert.Equal(exp1, result.One);
        }