public void SuggestFioPartsTest() { var query = new FioSuggestQuery("викт"); query.parts = new FioPart[] { FioPart.SURNAME }; var response = api.QueryFio(query); Assert.AreEqual("Викторова", response.suggestions[0].data.surname); Console.WriteLine(string.Join("\n", response.suggestions)); }
public async Task SuggestFioPartsTest() { var query = new FioSuggestQuery("викт") { Parts = new FioPart[] { FioPart.SURNAME } }; var response = await Api.QueryFio(query); Assert.Equal("Викторова", response.Suggestions[0].Data.Surname); }
public SuggestFioResponse QueryFio(FioSuggestQuery query) { var request = new RestRequest(FIO_RESOURCE, Method.POST); return(Execute <SuggestFioResponse>(request, query)); }