Пример #1
0
        public void EmptyMoneyFromMachine_ShouldWork()
        {
            decimal expectedCash;
            decimal actualCash;

            expectedCash = mockDataAccess.MachineInfo.cashOnHand;
            actualCash   = sodaMachineLogic.EmptyMoneyFromMachine();

            Assert.AreEqual(expectedCash, actualCash);
        }
Пример #2
0
        public void EmptyMoneyFromMachine_ShouldWork()
        {
            MockDataAccess   da    = new MockDataAccess();
            SodaMachineLogic logic = new SodaMachineLogic(da);

            var(_, expected, _) = da.MachineInfo;
            decimal actual = logic.EmptyMoneyFromMachine();

            Assert.Equal(expected, actual);

            expected       = 0;
            (_, actual, _) = da.MachineInfo;

            Assert.Equal(expected, actual);
        }