public void CreatehandlerUsingMockingContainer()
        {
            MockingContainer container = new MockingContainer(new MockRepository());
            MessageHandler   mw        = container.ResolveRealObject <MessageHandler>();

            Assert.IsNotNull(mw);
        }
        public void Handle_SimpleMessage_ReturnsTrue()
        {
            MockingContainer container = new MockingContainer(new MockRepository());
            MessageHandler   mw        = container.ResolveRealObject <MessageHandler>();
            bool             handle    = mw.Handle("a");

            Assert.IsTrue(handle);
        }
        public void Handle_SimpleMessage_SendEmail()
        {
            MockRepository   mocks     = new MockRepository();
            MockingContainer container = new MockingContainer(mocks);
            MessageHandler   mw        = container.ResolveRealObject <MessageHandler>();

            using (mocks.Record())
            {
                container.Resolve <IEmailer>()
                .Send("message", "a", "*****@*****.**");
            }
            bool handle = mw.Handle("a");

            mocks.VerifyAll();
        }