public void TwoMessagesWithDifferentNeedsReturnDifferentHashCodes()
        {
            Mock <IQueueWrapper>           qw         = new Mock <IQueueWrapper>();
            Mock <ILogger>                 log        = new Mock <ILogger>();
            Mock <IConfigurationManager>   config     = new Mock <IConfigurationManager>();
            Mock <IMethodInspectorManager> mim        = new Mock <IMethodInspectorManager>();
            MessageSubscriber              subscriber = new MessageSubscriber(qw.Object, log.Object, config.Object, metrics, mim.Object, Mock.Of <IContainerFacade>());


            Guid messageGuid = Guid.NewGuid();

            BasicDeliverEventArgs bdea1 = new BasicDeliverEventArgs();

            bdea1.Body = Encoding.ASCII.GetBytes("{" + $"uuid:\"{messageGuid}\",method:\"Hello\",need:\"1234\"" + "}");
            MessageSubscriber.MethodInspector mi1 = subscriber.GetMethodInspector(bdea1);
            Assert.IsNotNull(mi1);

            BasicDeliverEventArgs bdea2 = new BasicDeliverEventArgs();

            bdea2.Body = Encoding.ASCII.GetBytes("{" + $"uuid:\"{messageGuid}\",method:\"Hello\",need:\"1233\"" + "}");
            MessageSubscriber.MethodInspector mi2 = subscriber.GetMethodInspector(bdea2);
            Assert.IsNotNull(mi2);

            Assert.AreNotEqual(mi1.Hash, mi2.Hash);
        }
        public void LongMessageReturnsGoodMethodInspector()
        {
            Mock <IQueueWrapper>           qw         = new Mock <IQueueWrapper>();
            Mock <ILogger>                 log        = new Mock <ILogger>();
            Mock <IConfigurationManager>   config     = new Mock <IConfigurationManager>();
            Mock <IMethodInspectorManager> mim        = new Mock <IMethodInspectorManager>();
            MessageSubscriber              subscriber = new MessageSubscriber(qw.Object, log.Object, config.Object, metrics, mim.Object, Mock.Of <IContainerFacade>());


            BasicDeliverEventArgs bdea = new BasicDeliverEventArgs
            {
                Body = Encoding.ASCII.GetBytes("{" + $"uuid:\"{Guid.NewGuid()}\",method:\"Hello\",need:\"12345678901234567890123456789012345678901234567890123456789012345678901234567890\"" + "}")
            };

            MessageSubscriber.MethodInspector mi = subscriber.GetMethodInspector(bdea);
            Assert.IsNotNull(mi);
        }
        public void BadMessageReturnsNullMethodInspector()
        {
            Mock <IQueueWrapper>           qw         = new Mock <IQueueWrapper>();
            Mock <ILogger>                 log        = new Mock <ILogger>();
            Mock <IConfigurationManager>   config     = new Mock <IConfigurationManager>();
            Mock <IMethodInspectorManager> mim        = new Mock <IMethodInspectorManager>();
            MessageSubscriber              subscriber = new MessageSubscriber(qw.Object, log.Object, config.Object, metrics, mim.Object, Mock.Of <IContainerFacade>());


            BasicDeliverEventArgs bdea = new BasicDeliverEventArgs
            {
                Body = Encoding.ASCII.GetBytes("Hello, Dave!")
            };

            MessageSubscriber.MethodInspector mi = subscriber.GetMethodInspector(bdea);
            Assert.IsNull(mi);
        }