public void EligibleBenefitTest_Repo_InvalidInput_ReturnsWrongValue(int policyId, int memberId) { string p = ""; Mock <IPolicyRepo> policyContextMock = new Mock <IPolicyRepo>(); var policyRepo = new PolicyRepo(); policyContextMock.Setup(x => x.GetEligibleBenefits(policyId, memberId)).Returns(p); var result = policyRepo.GetEligibleBenefits(policyId, memberId); Assert.AreNotEqual("MedicalCheckup", result); Assert.AreEqual("Invalid Data", result); }
public void RepoTestPass(int policyId, int memberId) { string p = ""; Mock <IPolicyRepo> policyContextMock = new Mock <IPolicyRepo>(); var policyRepo = new PolicyRepo(); policyContextMock.Setup(x => x.GetEligibleBenefits(policyId, memberId)).Returns(p); var result = policyRepo.GetEligibleBenefits(policyId, memberId); Assert.IsNotNull(result); Assert.AreEqual("MedicalCheckup", result); }