public void RobotManagerChargesProperly() { RobotManager robotManager = new RobotManager(1); Robot robot = new Robot("Pesho", 100); robotManager.Add(robot); robotManager.Work(robot.Name, "da", 100); robotManager.Charge(robot.Name); Assert.That(robot.Battery, Is.EqualTo(robot.MaximumBattery)); }
public void ThrowsExceptionOnChargingNullRobot() { RobotManager robotManager = new RobotManager(1); Assert.That(() => robotManager.Charge("d"), Throws.InvalidOperationException.With.Message.EqualTo($"Robot with the name d doesn't exist!")); }