/// <summary> /// Prevents a default instance of the <see cref="ContractServiceLinePaymentTypesController"/> class from being created. /// </summary> ContractServiceLinePaymentTypesController() { int facilityId = Convert.ToInt32(System.Web.HttpContext.Current.Request.Headers[Constants.BubbleDataSource]); string bubbleDataSource = GetFacilityConnection(facilityId); _contractServiceLinePaymentTypesLogic = new ContractServiceLinePaymentTypeLogic(bubbleDataSource); }
public void ContractServiceLinePaymentTypeLogicConstructorTest() { var mockcontractServiceLinePaymentTypesRepository = new Mock <IContractServiceLinePaymentTypeRepository>(); var target = new ContractServiceLinePaymentTypeLogic(mockcontractServiceLinePaymentTypesRepository.Object); Assert.IsInstanceOfType(target, typeof(ContractServiceLinePaymentTypeLogic)); }
public void DeleteContractServiceLInesandPaymentTypesByIdUnitTest() { var mockProductRepository = new Mock <IContractServiceLinePaymentTypeRepository>(); ContractServiceLinePaymentType objcontractDocs = new ContractServiceLinePaymentType { ContractId = 1 }; mockProductRepository.Setup(f => f.DeleteContractServiceLinesAndPaymentTypes(objcontractDocs)).Returns(true); ContractServiceLinePaymentTypeLogic target = new ContractServiceLinePaymentTypeLogic(mockProductRepository.Object); bool actual = target.DeleteContractServiceLinesAndPaymentTypes(objcontractDocs); Assert.AreEqual(true, actual); }
public void DeleteContractServiceLinesAndPaymentTypesTest() { var repository = new Mock <IContractServiceLinePaymentTypeRepository>(); repository.Setup(f => f.DeleteContractServiceLinesAndPaymentTypes(null)).Returns(false); ContractServiceLinePaymentTypeLogic target = new ContractServiceLinePaymentTypeLogic(repository.Object); bool actual = target.DeleteContractServiceLinesAndPaymentTypes(null); Assert.AreEqual(false, actual); //ContractServiceLinePaymentTypeLogic target = new ContractServiceLinePaymentTypeLogic(); //bool actual = target.DeleteContractServiceLinesAndPaymentTypes(null); //Assert.AreEqual(false, actual); }
public void ContractServiceLinePaymentTypeLogicConstructorTest1() { ContractServiceLinePaymentTypeLogic target = new ContractServiceLinePaymentTypeLogic(Constants.ConnectionString); Assert.IsInstanceOfType(target, typeof(ContractServiceLinePaymentTypeLogic)); }