예제 #1
0
        public void ContractInfoLogicConstructorTest1()
        {
            Mock <IContractPayerInfoRepository> mockAddEditContractPayerInfo = new Mock <IContractPayerInfoRepository>();
            ContractPayerInfoLogic target = new ContractPayerInfoLogic(mockAddEditContractPayerInfo.Object);

            Assert.IsInstanceOfType(target, typeof(ContractPayerInfoLogic));
        }
예제 #2
0
        public void ContractInfoLogicConstructorTest()
        {
            var target = new ContractPayerInfoLogic(Constants.ConnectionString);

            //Assert
            Assert.IsInstanceOfType(target, typeof(ContractPayerInfoLogic));
        }
예제 #3
0
        /// <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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }