public void Repro() { Asteroid theExplodingAsteroidRef = new ExplodingAsteroid(); SpaceShip theApolloSpacecraftRef = new ApolloSpacecraft(); var collideWith = theExplodingAsteroidRef.CollideWith(theApolloSpacecraftRef); Check.That(collideWith).IsEqualTo("ExplodingAsteroid hit a ApolloSpacecraft"); }
public override string CollideWith(ApolloSpacecraft ship) { return($"ExplodingAsteroid hit an {ship.GetShipType()}"); }
public virtual string CollideWith(ApolloSpacecraft ship) { return("Asteroid hit an ApolloSpacecraft"); }