public void NoAnimalsHandleTest() { var handler = new NoAnimalsNoiseHandler(); var menagerie = new Menagerie(); var result = handler.Handle(menagerie); Assert.AreEqual("No animals in the menagerie", result); }
public void NoAnimalsHandleInvalidTest() { var handler = new NoAnimalsNoiseHandler(); Mock <NoiseHandler> mockHandler = GetMockHandler(); handler.Successor = mockHandler.Object; var menagerie = new Menagerie(); var animal = new Wolf("test", 1); menagerie.AddAnimal(animal); var result = handler.Handle(menagerie); mockHandler.Verify(mh => mh.Handle(menagerie)); }