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()); }
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()); }