public void CanCalculateTopSkillsForProfiles() { var category = JobCategories.First(c => c.Title.EqualsIgnoreCase("Animal Care")).Id; var profiles = JobProfiles.Where(c => c.JobProfileCategories.Contains(category)).ToArray(); var result = profiles.GetSkillAttributes(ProminentSkills, 0.75); Assert.Collection(result, s => Assert.Equal("self control", s.ONetAttribute.ToLower()), s => Assert.Equal("cooperation", s.ONetAttribute.ToLower()), s => Assert.Equal("speaking, verbal abilities", s.ONetAttribute.ToLower())); }
public IndexViewModel Fill(MandatorResponse mandatorResponse, IEnumerable <string> jobProfiles) { JobProfiles = jobProfiles.OrderBy(x => x).ToList(); AvailableJobProfiles = (from x in mandatorResponse.JobProfiles where !JobProfiles.Any(y => y.Is(x)) orderby x select new SelectListItem { Text = x, Value = x }).ToList(); return(this); }
public void ShouldReturnTrueForExistingSkillGetJobProfileSkillMapping() { var profile = JobProfiles.Where(p => p.Title.EqualsIgnoreCase("Accommodation warden")).ToList(); var result = JobCategorySkillMapper.GetJobProfileMapping(profile, new SkillAttribute { ProfilesWithSkill = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase) { "Accommodation warden" } }); Assert.Single(result, p => p.Included && p.JobProfile == "Accommodation warden"); }