示例#1
0
        public void Moves_Returns_Response_StillInDanger_For_Cannot_move()
        {
            SetMindField(MoveResult.CannotMove);
            var t = new Tur.Turtle(_mindField.Object, CompassDirection.West);

            t.Move();
            Assert.AreEqual(t.CurentStatus, Tur.TurtleStatus.StillInDanger);
        }
示例#2
0
        public void Moves_Returns_Response_Success()
        {
            SetMindField(MoveResult.Success);
            var t = new Tur.Turtle(_mindField.Object, CompassDirection.West);

            t.Move();
            Assert.AreEqual(t.CurentStatus, Tur.TurtleStatus.Success);
        }
示例#3
0
        public void Moves_Calls_The_Service()
        {
            SetMindField(MoveResult.MineHit);
            var t = new Tur.Turtle(_mindField.Object, CompassDirection.West);

            t.Move();
            _mindField.Verify(m => m.Move(It.Is <CompassDirection>(cd => cd == CompassDirection.West)), Times.Once);
        }