コード例 #1
0
ファイル: RobotsTests.cs プロジェクト: Svetoslavb04/SoftUni
        public void RobotManagerRemovesProperly()
        {
            Robot        robot        = new Robot("Pesho", 100);
            RobotManager robotManager = new RobotManager(10);

            robotManager.Add(robot);
            robotManager.Remove(robot.Name);
            Assert.That(robotManager.Count, Is.EqualTo(0));
        }
コード例 #2
0
ファイル: RobotsTests.cs プロジェクト: Svetoslavb04/SoftUni
        public void RobotManagerThorowsExceptionOnInvalidNameToRemove()
        {
            RobotManager robotManager = new RobotManager(10);

            Assert.That(() => robotManager.Remove("Goso"), Throws.InvalidOperationException.With.Message.EqualTo($"Robot with the name Goso doesn't exist!"));
        }