public void PaymentTableLogicParameterlessConstructorTest1() { var target = new PaymentTableLogic(Constants.ConnectionString); //Assert Assert.IsInstanceOfType(target, typeof(PaymentTableLogic)); }
public void PaymentTableLogicParameterlessConstructorTest2() { Mock <IPaymentTableRepository> mockPaymentTableLogic = new Mock <IPaymentTableRepository>(); PaymentTableLogic target = new PaymentTableLogic(mockPaymentTableLogic.Object); Assert.IsInstanceOfType(target, typeof(PaymentTableLogic)); }
public void PaymentTableLogicConstructorTest1() { var mockPaymentTableRepository = new Mock <IPaymentTableRepository>(); PaymentTableLogic target = new PaymentTableLogic(mockPaymentTableRepository.Object); Assert.IsInstanceOfType(target, typeof(PaymentTableLogic)); }
public void PaymentTableLogicConstructorTest() { var target = new PaymentTableLogic(); //Assert Assert.IsInstanceOfType(target, typeof(PaymentTableLogic)); }
/// <summary> /// Initializes a new instance of the <see cref="PaymentTableController"/> class. /// </summary> public PaymentTableController() { int facilityId = Convert.ToInt32(System.Web.HttpContext.Current.Request.Headers[Constants.BubbleDataSource]); string bubbleDataSource = GetFacilityConnection(facilityId); _paymentTableLogic = new PaymentTableLogic(bubbleDataSource); }
public void GetPaymentTable() { var mockPaymentTableLogic = new Mock <IPaymentTableRepository>(); PaymentTableContainer result = new PaymentTableContainer(); mockPaymentTableLogic.Setup(f => f.GetPaymentTable(It.IsAny <ClaimFieldDoc>())).Returns(result); PaymentTableLogic target = new PaymentTableLogic(mockPaymentTableLogic.Object); PaymentTableContainer actual = target.GetPaymentTable(new ClaimFieldDoc()); Assert.AreEqual(result, actual); }
public void IsTableNameExists() { var mockPaymentTableLogic = new Mock <IPaymentTableRepository>(); const bool result = true; mockPaymentTableLogic.Setup(f => f.IsTableNameExists(It.IsAny <ClaimFieldDoc>())).Returns(result); PaymentTableLogic target = new PaymentTableLogic(mockPaymentTableLogic.Object); bool actual = target.IsTableNameExists(new ClaimFieldDoc()); Assert.AreEqual(result, actual); }
public void IsTableNameExistsTest() { // Arrange var mockPaymentTableRepository = new Mock <IPaymentTableRepository>(); mockPaymentTableRepository.Setup(f => f.IsTableNameExists(It.IsAny <ClaimFieldDoc>())).Returns(true); PaymentTableLogic target = new PaymentTableLogic(mockPaymentTableRepository.Object); //Act bool actual = target.IsTableNameExists(null); //Assert Assert.AreEqual(true, actual); }
public void GetCustomPaymentTable() { var repository = new Mock <IPaymentTableRepository>(); PaymentTableContainer result = new PaymentTableContainer(); var value = new ClaimFieldDoc { ClaimFieldDocId = 10101, ClaimFieldId = 35, PageSetting = new PageSetting { Skip = 0, SortDirection = "", SortField = "", Take = 5 } }; repository.Setup( f => f.GetCustomPaymentTable(value)).Returns(result); PaymentTableLogic target = new PaymentTableLogic(repository.Object); PaymentTableContainer actual = target.GetPaymentTable(value); Assert.AreEqual(result, actual); }
public void GetAllClaimFieldsTest() { // Arrange var mockPaymentTableRepository = new Mock <IPaymentTableRepository>(); List <ClaimField> claimFieldList = new List <ClaimField> { new ClaimField { ClaimFieldDocId = 1, TableName = "ASC Table" } }; mockPaymentTableRepository.Setup(f => f.GetAllClaimFields()).Returns(claimFieldList); PaymentTableLogic target = new PaymentTableLogic(mockPaymentTableRepository.Object); // Act List <ClaimField> actual = target.GetAllClaimFields(); // Assert Assert.AreEqual(claimFieldList, actual); }