예제 #1
0
        public void _釣り銭を補充する_正しくない枚数の場合(Money inMoney, int inCount)
        {
            var pool = new CreditPool();

            var role = new ChangePoolRole();

            Assert.Throws<Exception>(() => role.Append(pool, inMoney, inCount));
        }
예제 #2
0
        public void _釣り銭を補充する_対象外金種の場合(Money inMoney, int inCount)
        {
            var pool = new CreditPool();

            var role = new ChangePoolRole();
            var newPool = role.Append(pool, inMoney, inCount);

            Assert.That(newPool.Credits.Where(c => c.Value > 0).Any(), Is.False);
        }
예제 #3
0
        public void _釣り銭を補充する(Money inMoney, int inCount)
        {
            var pool = new CreditPool();

            var role = new ChangePoolRole();
            var newPool = role.Append(pool, inMoney, inCount);

            Assert.That(newPool.Credits.Where(c => c.Value > 0).Any(), Is.True);
            Assert.That(newPool.Credits[inMoney], Is.EqualTo(inCount));
        }