Ejemplo n.º 1
0
        public void NightHandleTest()
        {
            var handler = new NightNoiseHandler();

            var menagerie = new Menagerie();

            menagerie.SetNight();

            var result = handler.Handle(menagerie);

            Assert.AreEqual("Shhh... It's the night", result);
        }
Ejemplo n.º 2
0
        public void NightHandleInvalidTest()
        {
            var handler = new NightNoiseHandler();

            Mock <NoiseHandler> mockHandler = GetMockHandler();

            handler.Successor = mockHandler.Object;

            var menagerie = new Menagerie();

            var result = handler.Handle(menagerie);

            mockHandler.Verify(mh => mh.Handle(menagerie));
        }