Example #1
0
        public void Repro()
        {
            Asteroid  theExplodingAsteroidRef = new ExplodingAsteroid();
            SpaceShip theApolloSpacecraftRef  = new ApolloSpacecraft();
            var       collideWith             = theExplodingAsteroidRef.CollideWith(theApolloSpacecraftRef);

            Check.That(collideWith).IsEqualTo("ExplodingAsteroid hit a ApolloSpacecraft");
        }
Example #2
0
 public override string CollideWith(ApolloSpacecraft ship)
 {
     return($"ExplodingAsteroid hit an {ship.GetShipType()}");
 }
Example #3
0
 public virtual string CollideWith(ApolloSpacecraft ship)
 {
     return("Asteroid hit an ApolloSpacecraft");
 }