title: Can I access the full power of Autofac in UnitTests, using the Moq integration
body: <p>My project (which happens built on top of <a href="http://www.orchardproject.net/" rel="nofollow">Orchard</a>, though I don't <em>think</em> that's relevant) uses <a href="https://github.com/autofac/Autofac" rel="nofollow">Autofac</a>.
  I am writing unit tests in which I want to stub out any dependencies using <a href="https://github.com/Moq/moq4" rel="nofollow">Moq</a>, and I'm using the <a href="https://www.nuget.org/packages/Autofac.Extras.Moq/" rel="nofollow">Autofac/Moq integration</a> to achieve this.</p>
  
  <p>This is fine for any simple dependencies that are being passed in as constructor arguments. (Autofac documentation provides details of how to achieve this <a href="http://autofac.readthedocs.org/en/latest/integration/moq.html" rel="nofollow">here</a>).</p>
  
  <p>But because I don't ever have a containerBuilder, I don't see how to use a lot of Autofac's power - <a href="http://autofac.readthedocs.org/en/latest/register/registration.html#register-registration-lambda-expression-components" rel="nofollow">lamda registration</a>, <a href="http://autofac.readthedocs.org/en/latest/register/registration.html#open-generic-components" rel="nofollow">registering generics</a>, marking properties to be <a href="http://autofac.readthedocs.org/en/latest/register/prop-method-injection.html#property-injection" rel="nofollow">auto-wired</a>. etc.</p>
  
  <ul>
  <li>Am I wrong and it is accessible somehow?</li>
  <li>Is this stuff just not available due to some inherent constraint of the scenario?</li>
  <li>Is it possible, just not implemented in this Autofac/Moq integration (yet)?</li>
  <li>Is there a good work around?</li>
  </ul>