コード例 #1
0
 public void CanMakeHydra()
 {
     Hydra hydra = new Hydra();
     Assert.Equal("Two grow back!", hydra.CutOffHead("sword"));
     Assert.Equal("Clever adventurer, the hydra now has 9 heads remaining", hydra.CutOffHead("fire"));
     Assert.Equal("Clever adventurer, the hydra now has 8 heads remaining", hydra.CutOffHead("Fire"));
     for (byte i = 8; i > 1; i--)
     {
         hydra.CutOffHead("Fire");
     }
     Assert.Equal("Victory, the hydra is slain!", hydra.CutOffHead("Fire"));
     Assert.Equal("Theogony (circa 700 BCE) by Hesiod", hydra.Source());
     Assert.Equal("Whatever it wants, really", hydra.Sustenance());
     Assert.Equal("Swim/Run", hydra.Locomotion());
 }