/// <summary>
        /// Default Constructor
        /// </summary>
        ReassignClaimController()
        {
            int    facilityId       = Convert.ToInt32(System.Web.HttpContext.Current.Request.Headers[Constants.BubbleDataSource]);
            string bubbleDataSource = GetFacilityConnection(facilityId);

            _reassignClaimLogic = new ReassignClaimLogic(bubbleDataSource);
        }
Ejemplo n.º 2
0
        public void GetContractsByNodelIdTestIfNull()
        {
            _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
            _mockReassignClaimRepository.Setup(f => f.GetContractsByNodeId(null));
            _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
            List <Contract> actual = _target.GetContractsByNodeId(null);

            Assert.IsNull(actual);
        }
Ejemplo n.º 3
0
        public void AddReassignedClaimJobTestIfNull()
        {
            _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
            _mockReassignClaimRepository.Setup(f => f.AddReassignedClaimJob(null));
            _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
            bool actual = _target.AddReassignedClaimJob(null);

            Assert.IsFalse(actual);
        }
Ejemplo n.º 4
0
        public void GetClaimLinkedCountIfNull()
        {
            _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
            const int result = 0;

            _mockReassignClaimRepository.Setup(f => f.GetClaimLinkedCount(null));
            _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
            int actual = _target.GetClaimLinkedCount(null);

            Assert.AreEqual(result, actual);
        }
Ejemplo n.º 5
0
        public void GetReassignGridDataTestIfNull()
        {
            _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
            ClaimSearchCriteria claimSearchCriteria = null;

            _mockReassignClaimRepository.Setup(f => f.GetReassignGridData(claimSearchCriteria));
            _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
            ReassignClaimContainer actual = _target.GetReassignGridData(null);

            Assert.IsNull(actual);
        }
Ejemplo n.º 6
0
        public void GetClaimLinkedCountTest()
        {
            _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
            ContractHierarchy contractHierarchy = new ContractHierarchy
            {
                NodeId = 579892
            };
            const int result = 5;

            _mockReassignClaimRepository.Setup(f => f.GetClaimLinkedCount(It.IsAny <ContractHierarchy>())).Returns(result);
            _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
            int actual = _target.GetClaimLinkedCount(contractHierarchy);

            Assert.AreEqual(result, actual);
        }
Ejemplo n.º 7
0
        public void InsertTrackTaskWithRetainedClaimTest()
        {
            _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
            ReassignedClaimJob reassignedClaimJob = new ReassignedClaimJob
            {
                RequestName = "AdjRequest_4576",
                UserName    = "******",
                DateType    = 1,
                DateFrom    = DateTime.MinValue,
                DateTo      = DateTime.MinValue
            };

            _mockReassignClaimRepository.Setup(f => f.AddReassignedClaimJob(It.IsAny <ReassignedClaimJob>())).Returns(true);
            _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
            bool actual = _target.AddReassignedClaimJob(reassignedClaimJob);

            Assert.IsTrue(actual);
        }
Ejemplo n.º 8
0
        public void GetReassignGridDataTest()
        {
            _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
            ClaimSearchCriteria claimSearchCriteria = new ClaimSearchCriteria {
                DateType = 1, StartDate = DateTime.MinValue, EndDate = DateTime.MinValue, NodeId = 123456, UserName = "******"
            };
            var result = new ReassignClaimContainer {
                ClaimData = new List <EvaluateableClaim> {
                    new EvaluateableClaim {
                        ClaimId = 98745621, BillType = "121", ClaimTotal = 1875, ModelId = 5879
                    }
                }
            };

            _mockReassignClaimRepository.Setup(f => f.GetReassignGridData(It.IsAny <ClaimSearchCriteria>())).Returns(result);
            _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
            ReassignClaimContainer actual = _target.GetReassignGridData(claimSearchCriteria);

            Assert.AreEqual(result, actual);
        }
Ejemplo n.º 9
0
        public void GetContractsByNodeIdTest()
        {
            _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
            ContractHierarchy contractHierarchy = new ContractHierarchy
            {
                NodeId = 579892
            };
            var result = new List <Contract>
            {
                new Contract {
                    ContractId = 194588, ContractName = "Contract 1"
                },
                new Contract {
                    ContractId = 194589, ContractName = "Contract 2"
                }
            };

            _mockReassignClaimRepository.Setup(f => f.GetContractsByNodeId(It.IsAny <ContractHierarchy>())).Returns(result);
            _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
            List <Contract> actual = _target.GetContractsByNodeId(contractHierarchy);

            Assert.AreEqual(result, actual);
        }
Ejemplo n.º 10
0
 public void ReassignClaimLogicForNullConstructor()
 {
     _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
     _target = new ReassignClaimLogic(Constants.ConnectionString);
     Assert.IsInstanceOfType(_target, typeof(ReassignClaimLogic));
 }
Ejemplo n.º 11
0
 public void ReassignClaimLogicConstructor()
 {
     _mockReassignClaimRepository = new Mock <IReassignClaimRepository>();
     _target = new ReassignClaimLogic(_mockReassignClaimRepository.Object);
     Assert.IsInstanceOfType(_target, typeof(ReassignClaimLogic));
 }
Ejemplo n.º 12
0
 public void ReassignClaimLogicLogicParemeterlessConstructor()
 {
     _target = new ReassignClaimLogic(Constants.ConnectionString);
     //Assert
     Assert.IsInstanceOfType(_target, typeof(ReassignClaimLogic));
 }