示例#1
0
        public void CreateRobot_WithValidInputs_IsValid()
        {
            Robot sut = new Robot(new StandardLogger());

            sut.TasksCount      = 2;
            sut.CurrentPosition = new Point("10 22");

            sut.AddCleanTask("E 2");
            sut.AddCleanTask("N 1");

            Assert.IsTrue(sut.IsValid);
        }
示例#2
0
        public void CreateRobot_With5TasksCount_And3AddedTask_IsNotValid()
        {
            Robot sut = new Robot(new StandardLogger());

            sut.TasksCount      = 5;
            sut.CurrentPosition = new Point("10 22");

            sut.AddCleanTask("E 2");
            sut.AddCleanTask("N 1");
            sut.AddCleanTask("N 2");

            Assert.IsFalse(sut.IsValid);
        }
示例#3
0
        public void CreateRobot_With10000TasksCount_And10000AddedTaskIsValid()
        {
            Robot sut = new Robot(new StandardLogger());

            sut.TasksCount      = 10000;
            sut.CurrentPosition = new Point("10 22");

            for (int i = 0; i < 10000; i++)
            {
                sut.AddCleanTask("E 1");
            }

            Assert.IsTrue(sut.IsValid);
        }