public async Task <SkillsGap> GetSkillsGapForOccupationAndGivenSkills <TOccupations>(string apiPath, string ocpApimSubscriptionKey, string occupation, string[] skillList) { occupation ??= ""; skillList ??= new string[0]; var request = new SkillsGapRequest() { Occupation = occupation, SkillList = skillList }; var postData = new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, MediaTypeNames.Application.Json); var result = await GetJsonListPost <SkillsGapAnalysis>($"{apiPath}/getskillsgapforoccupationandgivenskills/Execute/", ocpApimSubscriptionKey, postData); return(Mapping.Mapper.Map <SkillsGap>(result)); }
public void WhenSkillsGapRequestMade_ReturnValues() { var request = new SkillsGapRequest() { Occupation = "Occupation", SkillList = new string[1] { "Skills" } }; var occupation = request.Occupation; var skills = request.SkillList; occupation.Should().Be("Occupation"); skills[0].Should().Be("Skills"); }