title: How to inject a mock Assembly for use with Moq
body: <p>There is a method in my controller that returns attribute data from the current executing assembly into a partial view.</p>
  
  <p>In this example, I'm merely pulling the Title, but I need to do more with it.</p>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>    var title = "";
  
      var asm = Assembly.GetExecutingAssembly();
      var attrs = asm.GetCustomAttributes(typeof(AssemblyTitleAttribute));
      var titleAttr = (AssemblyTitleAttribute)attributes[0];
  
      title = titleAttr.Title;
  
      return PartialView("_Build", title);
  </code></pre>
  
  <p>When writing the unit test in Moq, I need to find a way to inject the Assembly attributes into a mock so that I can verify that the correct attributes are being generated when I run the controller test, and then do x or y with my asserts.</p>
  
  <p><strong>UnitTest:</strong></p>
  
  <pre><code>    //Arrange
      //The magic I need to happen.
  
      //Act
      var controller = GetController();
      var result = controller.MyMethod() as PartialViewResult;
      var title = result.Model;
  
      //Assert
      Assert.AreEqual("Title", title); //currently static, need to verify against a mock
  </code></pre>
  
  <p>I know this is an extremely simple set of code, but I just need proof of concept at this point.</p>
  
  <p>Is there a good way to create a fake Assembly?
  Do I need to use System.Reflection.Emit?</p>