public void Mower_ToString_ShouldReturnCorrectOutput() { Mower mower = new Mower("Husquarna 350", 10.5, 1.7, 100.55); string text = mower.ToString(); Assert.AreEqual("Ich heiße Husquarna 350 und kann maximal 100,55 m² Rasen mit 1,7 km/H mähen", mower.ToString()); }
/// <summary> /// Drive our mower will throw in mower not initialised /// </summary> /// <param name="command"></param> /// <returns></returns> public string RunCommand(string command) { if (_currentMower == null) { throw new NullReferenceException("Please run InitMower() before running command"); } _currentMower.RunCommand(command); return(_currentMower.ToString()); }