public void ValidPositionAndFacingIsOnTable()
        {
            GetValidMockContextAndSettingWhichOnTable(out var mockContext, out var mockSettings);
            var service = new ToyRobotService(mockContext.Object, mockSettings.Object);
            var actual  = service.IsOnTable();

            Assert.IsTrue(actual);
        }
        public void NullFacingIsNotOnTable()
        {
            GetValidMockContextAndSettingWhichOnTable(out var mockContext, out var mockSettings);
            mockContext.Setup(mc => mc.Facing).Returns((Facing?)null);
            var service = new ToyRobotService(mockContext.Object, mockSettings.Object);
            var actual  = service.IsOnTable();

            Assert.IsFalse(actual);
        }
        public void ValidPositionIsOnTable_SameAsMaxY()
        {
            GetValidMockContextAndSettingWhichOnTable(out var mockContext, out var mockSettings);
            var position = mockContext.Object.Position;

            position.Y = mockSettings.Object.MaxY;
            var service = new ToyRobotService(mockContext.Object, mockSettings.Object);
            var actual  = service.IsOnTable();

            Assert.IsTrue(actual);
        }
        public void InvalidPositionIsNotOnTable_BiggerThanMaxY()
        {
            GetValidMockContextAndSettingWhichOnTable(out var mockContext, out var mockSettings);
            var position = mockContext.Object.Position;

            position.Y = mockSettings.Object.MaxY + 1;
            var service = new ToyRobotService(mockContext.Object, mockSettings.Object);
            var actual  = service.IsOnTable();

            Assert.IsFalse(actual);
        }