public void TestWrite()
        {
            IMessageBusWriter <string> messageBusWriter = _erector.Container.Resolve <IMessageBusWriter <string> >();
            string messageBusGUID           = null;
            IMessageBus <string> messageBus = GetMockedMessageBus <string>();
            bool   writeSucceeded           = false;
            string message = "Jesus Loves You.";

            try
            {
                writeSucceeded = messageBusWriter.Write(message);
            }
            catch (InvalidOperationException ex)
            {
                Assert.AreEqual(ex.Message, messageBusWriter.ExceptionMessage_MessageBusCannotBeNull);
            }
            messageBusGUID = messageBusWriter.SpecifyTheMessageBus(messageBus);
            Assert.IsFalse(String.IsNullOrEmpty(messageBusGUID));
            try
            {
                writeSucceeded = messageBusWriter.Write(String.Empty);
            }
            catch (InvalidOperationException ex)
            {
                Assert.AreEqual(ex.Message, messageBusWriter.ExceptionMessage_MessageCannotBeNullOrEmpty);
            }
            writeSucceeded = messageBusWriter.Write(message);
            Assert.IsTrue(writeSucceeded);
            messageBusWriter.Dispose();
        }
        public void TestSpecifyTheMessageBus()
        {
            IMessageBusWriter <string> messageBusWriter = _erector.Container.Resolve <IMessageBusWriter <string> >();
            string messageBusGUID = null;

            try
            {
                messageBusGUID = messageBusWriter.SpecifyTheMessageBus(null);
            }
            catch (InvalidOperationException ex)
            {
                Assert.AreEqual(ex.Message, messageBusWriter.ExceptionMessage_MessageBusCannotBeNull);
            }
            IMessageBus <string> messageBus = GetMockedMessageBus <string>();

            messageBusGUID = messageBusWriter.SpecifyTheMessageBus(messageBus);
            Assert.IsFalse(String.IsNullOrEmpty(messageBusGUID));
            messageBusWriter.Dispose();
        }