Ejemplo n.º 1
0
        public ClaimRecord GetClaimResults()
        {
            ClaimRecord cliamRecord = null;

            for (var i = 0; i < 4; i++)
            {
                try
                {
                    var records = this.WaitForElementToBeClickeable(addClosingCostReport);
                    if (records.FindElements(By.ClassName("epiq-lookup-picker-card  ")).Count <= 1)
                    {
                        cliamRecord = new ClaimRecord(records);
                    }
                    else
                    {
                        foreach (var record in records.FindElements(By.ClassName("epiq-lookup-picker-card  ")))
                        {
                            var claims = new ClaimRecord(record);
                            _claimNames.Add(claims.ClaimName);
                            _claimNumbers.Add(claims.ClaimNumber);
                        }
                    }
                    break;
                }
                catch (StaleElementReferenceException e)
                {
                    continue;
                }
            }
            return(cliamRecord);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Install permissions
        /// </summary>
        /// <param name="permissionProvider">Permission provider</param>
        public virtual void InstallPermissions(IPermissionProvider permissionProvider)
        {
            //install new permissions
            var permissions = permissionProvider.GetPermissions();
            //default user role mappings
            var defaultPermissions = permissionProvider.GetDefaultPermissions().ToList();

            foreach (var permission in permissions)
            {
                var permission1 = GetPermissionRecordBySystemName(permission.SystemName);
                if (permission1 != null)
                {
                    continue;
                }

                //new permission (install it)
                permission1 = new PermissionRecord
                {
                    Name       = permission.Name,
                    SystemName = permission.SystemName,
                    Category   = permission.Category
                };

                foreach (var defaultPermission in defaultPermissions)
                {
                    var claim = _claimRecordRepository.Table.Where(role => role.SystemName.Equals(defaultPermission.CustomerRoleSystemName)).FirstOrDefault();
                    if (claim == null)
                    {
                        //new role (save it)
                        claim = new ClaimRecord
                        {
                            Name       = defaultPermission.CustomerRoleSystemName,
                            Active     = true,
                            SystemName = defaultPermission.CustomerRoleSystemName
                        };
                        _claimRecordRepository.Insert(claim);
                    }

                    var defaultMappingProvided = (from p in defaultPermission.PermissionRecords
                                                  where p.SystemName == permission1.SystemName
                                                  select p).Any();
                    var mappingExists = (from mapping in claim.PermissionRecordClaimRecordMappings
                                         where mapping.PermissionRecord.SystemName == permission1.SystemName
                                         select mapping.PermissionRecord).Any();
                    if (defaultMappingProvided && !mappingExists)
                    {
                        //permission1.UserRoles.Add(claim);
                        permission1.PermissionRecordClaimRecordMappings.Add(new PermissionRecordClaimRecordMapping {
                            ClaimRecord = claim
                        });
                    }
                }

                //save new permission
                InsertPermissionRecord(permission1);

                //save localization
                //_localizationService.SaveLocalizedPermissionName(permission1);
            }
        }
Ejemplo n.º 3
0
        public void ClaimRecordValidSsnAndPinTest()
        {
            var claimRecord = new ClaimRecord()
            {
                Ssn = "123456789", Pin = "1234"
            };
            var validationResult = ValidationHelper.ValidateEntity(claimRecord);

            Assert.IsTrue(validationResult.HasError == false,
                          "Expected good SSN and PIN");
        }
Ejemplo n.º 4
0
        public List <string> GetClaimResultsInfo()
        {
            this.Pause(5);
            var record  = this.WaitForElementToBeClickeable(addClosingCostReport);
            var records = new ClaimRecord(record);
            var list    = new List <string>()
            {
                records.ClaimName, records.ClaimNumber, records.Code, records.Allowed, records.PaidToDate, records.BalanceDue,
            };

            return(list);
        }
Ejemplo n.º 5
0
        public ClaimRecord Build()
        {
            var claimRecord = new ClaimRecord(this)
            {
                AllDoneCode  = _AllDoneCode,
                Ssn          = _Ssn,
                Pin          = _Pin,
                LanguageCode = _LanguageCode
            };

            return(claimRecord);
        }
Ejemplo n.º 6
0
 public static Claim ToClaim(this ClaimRecord claimlightRecord)
 {
     return(new Claim
     {
         ClaimId = claimlightRecord.ClaimId,
         ClaimTypeId = claimlightRecord.ClaimTypeId,
         FirstName = claimlightRecord.FirstName,
         LastName = claimlightRecord.LastName,
         Email = claimlightRecord.Email,
         PolicyNumber = claimlightRecord.PolicyNumber
     });
 }