private void ServicePreparation(out IOptions <HereAPICredentials> hereApiCredentialsOptions, out JsonRouteRepository jsonRepository, out Mock <IHttpClientFactory> httpClientFactoryMoq)
        {
            var client = new HttpClient();

            hereApiCredentialsOptions = Options.Create(new HereAPICredentials()
            {
                AppId = "PXiCuHPaKy6hKqKV9Bb6", AppCode = "Mdwq9IojkCEoCmOuXdARcQ"
            });
            jsonRepository       = new JsonRouteRepository();
            httpClientFactoryMoq = new Mock <IHttpClientFactory>();
            httpClientFactoryMoq.Setup(x => x.CreateClient(It.IsAny <string>())).Returns(client);
        }
Пример #2
0
        public void GetAllTest()
        {
            var someOptions = Options.Create(new JsonRepositoryPath()
            {
                Path = "FakeData"
            });
            var jsonWaypointsRepository = new JsonRouteRepository(someOptions);

            var waypoints = jsonWaypointsRepository.GetAll();

            Assert.NotEmpty(waypoints);
        }