Please refer the below code.
Method signature in the Interface
OrganizationVM GetParty(int param1, int param2, int param3);
Test method
[TestMethod]
public void GetOrganizationByPartyRoleId()
{
int param1 = 1;int param2 = 1;int param3 = 1;
OrganizationVM org = this.MockManager.GetParty(param1, param2, param3);
Assert.IsNotNull(org);
}
Test project's constructor
int partyId = 2;
mockPartyManager.Setup(mr => mr.GetParty(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>())).Returns((int i) => organizationList.Where(x => x.partyID == i).Single());
This throws
Parameter count mismatch. exception. How to solve this issue.