title: Remove method attributes from mocked objects in C#
body: <p>I am testing methods of a class. However, some of them have attributes that do non-related stuff and this make tests fail. </p>
  
  <p>For example, I have this class (in <code>VB.net</code> but could be <code>C#</code> as well)</p>
  
  <pre><code>&lt;AttributeOne()&gt;
  &lt;AttributeTwo(Arg1, Arg2)&gt;
  Public Overridable Function SomeMethod() As Object
     ' Stuff
  End Function
  </code></pre>
  
  <p>When I call <code>SomeMethod</code> from my mocked object, it will raise some Exceptions because the attributes try to do some stuff that in unit-testing context will not be possible.</p>
  
  <pre><code>[TestFixture]
  public class SomeClassUnitTests
  {
      [Test]
      public void TestSomeMethod()
      {
          var someClassMock = new Mock&lt;SomeClass&gt;() { CallBase = true };
  
          //Exception is thrown
          var result = someClassMock.Object.SomeMethod();
      }
  }
  </code></pre>
  
  <p>The tests are written in <code>C#</code>. I am using <code>Moq</code> and <code>Nunit</code></p>
  
  <p>How can I ignore these attributes when unit-testing?</p>