Exemplo n.º 1
0
        public void EjectQuarter_WithBalls_SouldEjectQuarter()
        {
            var gm = new GumballMachine.GumballMachine(5);

            gm.EjectQuarter();
            Assert.AreEqual(GetGumballMachineString(5, "waiting for quarter"), gm.ToString());
        }
Exemplo n.º 2
0
        public void InsertQuarter_ShouldInsertQuarter()
        {
            var gm = new GumballMachine.GumballMachine(5);

            gm.InsertQuarter();
            Assert.AreEqual(GetGumballMachineString(5, "waiting for turn of crank"), gm.ToString());
        }
Exemplo n.º 3
0
        public void TurnCrank_AfterInsertQuarter_ShouldTurnCrank()
        {
            var gm = new GumballMachine.GumballMachine(5);

            gm.InsertQuarter();
            gm.TurnCrank();
            Assert.AreEqual(GetGumballMachineString(4, "waiting for quarter"), gm.ToString());
        }
Exemplo n.º 4
0
        public void CanCreateGumballMachine()
        {
            var gm = new GumballMachine.GumballMachine(5);

            Assert.AreEqual(GetGumballMachineString(5, "waiting for quarter"), gm.ToString());
        }