public void UnderAgeDriverWithoutDrivingLicenseCantDriveCar() { var driver = new Driver(12, false); var sut = new CarProxy(driver, new Car()); Assert.Throws <InvalidOperationException>(() => sut.DriveCar()); }
public void MatureDriverWithDrivingLicenseCanDriveCarEdgeCase() { var driver = new Driver(18, true); var sut = new CarProxy(driver, new Car()); var result = sut.DriveCar(); Assert.AreEqual("Car has been driven!", result); }