title: How do I get CreateUsingInMemory() to work with MassTransit?
body: <p>Here's my entire code.  I think the test should pass, but it fails.  I've (unsuccessfully) tried using some of the overloads to <code>Consumer</code>.</p>
  
  <pre><code>using MassTransit;
  using NUnit.Framework;
  using System.Threading.Tasks;
  
  namespace MassTransitTests
  {
      public class Message
      {
      }
  
      public class MessageConsumer : IConsumer&lt;Message&gt;
      {
          public static int ConsumedCount
          {
              get;
              private set;
          }
  
          public Task Consume(ConsumeContext&lt;Message&gt; context)
          {
              ConsumedCount++;
              return Task.FromResult(0);
          }
      }
  
      [TestFixture]
      public class MassTransitTest
      {
          [Test]
          public async Task BasicTestAsync()
          {
              // Arrange
              var control = Bus.Factory.CreateUsingInMemory(configure =&gt;
              {
                  configure.ReceiveEndpoint("myQueue", endpoint =&gt;
                  {
                      endpoint.Consumer&lt;MessageConsumer&gt;();
                  });
              });
  
              // Act
              using (var handle = control.Start())
              {
                  await control.Publish(new Message());
                  await control.Publish(new Message());
              }
  
              // Assert
              Assert.That(MessageConsumer.ConsumedCount, Is.EqualTo(2));
          }
      }
  }
  </code></pre>
  
  <p>Their <a href="http://masstransit.readthedocs.org/en/master/configuration/transports/in_memory.html?highlight=inmemory" rel="nofollow">documentation</a> shows this, which is what I'm doing:</p>
  
  <pre><code>var busControl = Bus.Factory.CreateUsingInMemory(cfg =&gt;
  {
      cfg.ReceiveEndpoint("queue_name", ep =&gt;
      {
         //configure the endpoint
      })
  });
  </code></pre>
  
  <p><strong>What am I doing wrong/what I do need to change in my Arrange/Act to get my Assert to work?</strong></p>