Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PayerController"/> class.
        /// </summary>
        public PayerController()
        {
            int    facilityId       = Convert.ToInt32(System.Web.HttpContext.Current.Request.Headers[Constants.BubbleDataSource]);
            string bubbleDataSource = GetFacilityConnection(facilityId);

            _payerLogic = new PayerLogic(bubbleDataSource);
        }
        public void PayerLogicConstructorUnitTest1()
        {
            var        mockPayerRepository = new Mock <IPayerRepository>();
            PayerLogic target = new PayerLogic(mockPayerRepository.Object);

            Assert.IsInstanceOfType(target, typeof(PayerLogic));
        }
        public void PayerLogicParameterlessConstructor()
        {
            var target = new PayerLogic(Constants.ConnectionString);

            //Assert
            Assert.IsInstanceOfType(target, typeof(PayerLogic));
        }
        public void GetPayersTestByServiceTypeId()
        {
            var mockPayerRepository = new Mock <IPayerRepository>();
            var value = new ContractServiceLineClaimFieldSelection {
                FacilityId = 0, ContractId = 0, ContractServiceTypeId = 275
            };
            var result = new List <Payer> {
                new Payer {
                    PayerName = "AETNA"
                }
            };

            mockPayerRepository.Setup(f => f.GetPayers(It.IsAny <ContractServiceLineClaimFieldSelection>())).Returns(result);
            PayerLogic   target = new PayerLogic(mockPayerRepository.Object);
            List <Payer> actual = target.GetPayers(value);

            Assert.AreEqual(result, actual);
        }