예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        public SuggestFioResponse QueryFio(FioSuggestQuery query)
        {
            var request = new RestRequest(FIO_RESOURCE, Method.POST);

            return(Execute <SuggestFioResponse>(request, query));
        }