public void A_cow_farm_gives_us_cows_milk() { var cow = new Cow(); var farm = new DairyFarm(cow); //The farm is 'given' the animal to be milked // TODO Please remove the incorrect assertion. Assert.That(farm.GetProduce(), Is.EqualTo("Cow's milk")); Assert.That(farm.GetProduce(), Is.EqualTo("Pig's milk")); }
public void This_is_because_cows_and_goats_are_milkable() { IMilkable cow = new Cow(); //Cow IMPLEMENTS the IMilkable contract IMilkable goat = new Goat(); //Goat IMPLEMENTS the IMilkable contract // TODO Please remove the incorrect assertion. Assert.Throws<ThisIsntMilkableException>(() => cow.Milk()); Assert.DoesNotThrow(() => goat.Milk()); }