public void DeleteQueryNameIsNullUnitTest() { // Arrange const bool expectedResult = false; //Mock setup Mock <IReportSelectionRepository> mockReportSelectionRepository = new Mock <IReportSelectionRepository>(); mockReportSelectionRepository.Setup(x => x.DeleteQueryName(It.IsAny <ClaimSelector>())).Returns(expectedResult); ReportSelectionLogic target = new ReportSelectionLogic(mockReportSelectionRepository.Object); // Act bool actual = target.DeleteQueryName(null); // Assert Assert.AreEqual(expectedResult, actual); }
public void DeleteQueryNameUnitTest() { // Arrange const bool expectedResult = true; ClaimSelector claimSelector = new ClaimSelector { QueryId = 23, UserName = "******", FacilityName = "SSI Demo Hospital", QueryName = "Q1011", SelectCriteria = "54|3|21~2|3|131" }; //Mock setup Mock <IReportSelectionRepository> mockReportSelectionRepository = new Mock <IReportSelectionRepository>(); mockReportSelectionRepository.Setup(x => x.DeleteQueryName(It.IsAny <ClaimSelector>())).Returns(expectedResult); ReportSelectionLogic target = new ReportSelectionLogic(mockReportSelectionRepository.Object); // Act bool actual = target.DeleteQueryName(claimSelector); // Assert Assert.AreEqual(expectedResult, actual); }
public bool DeleteQueryName(ClaimSelector claimSelector) { return(_reportSelectionLogic.DeleteQueryName(claimSelector)); }