title: Mock Automapper map which has multiple sources
body: <p>I am writing a xunit test for a method that has a mapper with a couple of sources. But I was unable mock the automapper.</p>
  <p>Mapper:</p>
  <pre><code>CreateMap&lt;(Foo foo, Boo boo), Dto&gt;()
   .ForMember(d =&gt; d.Name, o =&gt; o.MapFrom(s =&gt; s.foo.Name))
   .ForMember(d =&gt; d.Age, o =&gt; o.MapFrom(s =&gt; s.boo.Age));
  </code></pre>
  <p>Unit Test:</p>
  <pre><code>[Fact]
  public void Handle_Test1()
  {
      //Arrange
      var mocker = new AutoMocker(); 
      var sut = mocker.CreateInstance&lt;Handler&gt;();
      var mapperMock = mocker.GetMock&lt;IMapper&gt;();
  
      var foo = new Foo { Name = &quot;Test&quot; };
      var boo = new Boo { Age = 25 };
      var dto = new Dto { Name = &quot;Test&quot;, Age = 25 };
      
      mapperMock.Setup(x =&gt; x.Map&lt;Dto(new Tuple&lt;Foo, Boo&gt; (foo, boo ))).Returns(dto);
  
      //Also tried
      //mapperMock.Setup(x =&gt; x.Map&lt;Dto(new { foo, boo })).Returns(dto);
  }
  </code></pre>
  <p>I was able to get it working using the below line. but I am trying to solve the issue using the above approach. Can someone pinpoint what I am doing wrong here?</p>
  <pre><code>mapperMock.Setup(x =&gt; x.Map&lt;Dto&gt;(It.IsAny&lt;object&gt;())).Returns(dto)
  </code></pre>