public void ContractInfoLogicConstructorTest1() { Mock <IContractPayerInfoRepository> mockAddEditContractPayerInfo = new Mock <IContractPayerInfoRepository>(); ContractPayerInfoLogic target = new ContractPayerInfoLogic(mockAddEditContractPayerInfo.Object); Assert.IsInstanceOfType(target, typeof(ContractPayerInfoLogic)); }
public void ContractInfoLogicConstructorTest() { var target = new ContractPayerInfoLogic(Constants.ConnectionString); //Assert Assert.IsInstanceOfType(target, typeof(ContractPayerInfoLogic)); }
/// <summary> /// Initializes a new instance of the <see cref="ContractPayerInfoController"/> class. /// </summary> public ContractPayerInfoController() { int facilityId = Convert.ToInt32(System.Web.HttpContext.Current.Request.Headers[Constants.BubbleDataSource]); string bubbleDataSource = GetFacilityConnection(facilityId); _contractLogic = new ContractPayerInfoLogic(bubbleDataSource); }
public void AddEditContractPayerInfoIfNull() { Mock <IContractPayerInfoRepository> mockAddEditContractPayerInfo = new Mock <IContractPayerInfoRepository>(); mockAddEditContractPayerInfo.Setup(f => f.AddEditContractPayerInfo(It.IsAny <ContractPayerInfo>())).Returns(1); ContractPayerInfoLogic target = new ContractPayerInfoLogic(mockAddEditContractPayerInfo.Object); ContractPayerInfo objAddEditContractPayerInfo = new ContractPayerInfo { ContractPayerInfoId = 1 }; long actual = target.AddContractPayerInfo(objAddEditContractPayerInfo); Assert.IsNotNull(actual); }
public void DeleteContractPayerInfoByIdMockTest1() { var mockAddEditContractPayerInfo = new Mock <IContractPayerInfoRepository>(); ContractPayerInfo objAddEditContractPayerInfo = new ContractPayerInfo { ContractPayerInfoId = 1, UserName = "******" }; mockAddEditContractPayerInfo.Setup(f => f.DeleteContractPayerInfo(objAddEditContractPayerInfo)).Returns(true); ContractPayerInfoLogic target = new ContractPayerInfoLogic(mockAddEditContractPayerInfo.Object); bool actual = target.DeleteContractPayerInfo(objAddEditContractPayerInfo); Assert.AreEqual(true, actual); }
public void GetContractPayerInfoMockTest1() { ContractPayerInfo objAddEditContractPayerInfo = new ContractPayerInfo { ContractPayerInfoId = 1 }; var mockAddEditContractPayerInfo = new Mock <IContractPayerInfoRepository>(); mockAddEditContractPayerInfo.Setup(f => f.GetContractPayerInfo(It.IsAny <long>())).Returns(objAddEditContractPayerInfo); ContractPayerInfoLogic target = new ContractPayerInfoLogic(mockAddEditContractPayerInfo.Object); ContractPayerInfo actual = target.GetContractPayerInfo(1); Assert.IsNotNull(actual); }