示例#1
0
        public void BlockUnblock()
        {
            Init();

            VengineMachine.Block(Coin1);
            VengineMachine.UnBlock(Coin2);

            Assert.IsTrue(Coin1.IsBlocking);
            Assert.IsFalse(Coin2.IsBlocking);
        }
        public void ChangeBlocking(Guid id, bool isBlocking)
        {
            CoinEntity coinEntity = _coinRepository.Get(id);

            _printer.CoinInfo(coinEntity);

            if (isBlocking)
            {
                _vengineMachine.Block(coinEntity);
            }
            else
            {
                _vengineMachine.UnBlock(coinEntity);
            }

            _logger.Info(" before _db.SaveChanges()...");
            _drinkRepository.SaveChanges();
        }