Пример #1
0
        public async void SolveMazebotMaze_Should_Call_IApiRequestProvider_CreatePostRequest()
        {
            _requestProvider.CreatePostRequest(Arg.Any <string>(), Arg.Any <Dictionary <string, string> >(), Arg.Any <object>(), Arg.Any <Dictionary <string, string> >());

            var url = "mapUrl";
            await _client.SolveMazebotMaze(url, "solution");

            _requestProvider.Received(1).CreatePostRequest($"{_noopsUrl}/{url}", Arg.Any <Dictionary <string, string> >(), Arg.Any <object>(), Arg.Any <Dictionary <string, string> >());
        }
Пример #2
0
        private async Task <MazebotResult> PostSolution(MazebotResponse mazebotMaze, NavigationDetails solution)
        {
            MazebotResult result = null;

            if (solution.Arrived)
            {
                result = await _apiClient.SolveMazebotMaze(mazebotMaze.MazePath, solution.PathTaken);
            }
            return(result);
        }