static void Main(string[] args) { Console.WriteLine("Welcome to the Zoo"); //create new animal array Animals[] animals = new Animals[6]; Puffin puffin = new Puffin() { IsInZoo = true, Name = "Puff Diddy" }; ScarletIbis scarletIbis = new ScarletIbis() { IsInZoo = true, Name = "Q-T Pie" }; Seahorse seahorse = new Seahorse() { IsInZoo = true, Name = "Sven" }; Stingray stingray = new Stingray() { IsInZoo = true, Name = "Spotty" }; Koala koala = new Koala() { IsInZoo = true, Name = "George" }; SnowLeopard snowLeopard = new SnowLeopard(); //Animal Array Contains 6 animals //Bird animals[0] = puffin; animals[1] = scarletIbis; // Fish animals[2] = seahorse; animals[3] = stingray; // Mammals animals[4] = koala; animals[5] = snowLeopard; //for loop to display animals foreach (var t in animals) { t.DisplayCard(); } }
public void PuffinInheritsBehavior() { //arrange Puffin puffin = new Puffin() { Name = "Puff Diddy" }; // act string expected = $"{puffin.GetMakeSound()}"; string input = puffin.GetMakeSound(); //assert Assert.Equal(expected, input); }