예제 #1
0
        void RobotService_Left_Placed_Allowed(Facing start, Facing expected, [Frozen]Mock<IRobot> mockRobot, RobotService sut)
        {
            mockRobot.SetupProperty(x => x.Placed, true);
            mockRobot.SetupProperty(x => x.F, start);

            sut.Left();

            mockRobot.VerifySet(r => r.F = expected, Times.Once());
        }
예제 #2
0
        void RobotService_Left_NotPlaced_Ignored(Facing start, Facing expected, [Frozen]Mock<IRobot> mockRobot, RobotService sut)
        {
            mockRobot.SetupProperty(x => x.Placed, false);
            mockRobot.SetupProperty(x => x.F, start);

            sut.Left();

            mockRobot.VerifySet(r => r.F = expected, Times.Never());
        }