コード例 #1
0
        public void GivenVersionRequestMessage()
        {
            // Arrange
            _scenarioContext["req"] = new HttpRequestMessage(HttpMethod.Get, "http://localhost/test")
            {
                Content = new StringContent(string.Empty)
            };

            _scenarioContext["log"] = new TraceWriterStub(TraceLevel.Info);
        }
コード例 #2
0
        public void GivenInputOf(int p0)
        {
            // Arrange
            _scenarioContext["req"] = new HttpRequestMessage(HttpMethod.Get, $"http://localhost/test?numberOfBytes={p0}")
            {
                Content = new StringContent(string.Empty)
            };

            _scenarioContext["log"] = new TraceWriterStub(TraceLevel.Info);
        }
        public async Task <IEnumerable <Provider> > GetProviderData()
        {
            //ILoggerFactory loggerFactory = new LoggerFactory();
            //ILogger logger = loggerFactory.CreateLogger<Program>();
            var                    logger = new TraceWriterStub(TraceLevel.Verbose);
            ProviderStorage        ps     = new ProviderStorage();
            IEnumerable <Provider> task   = await ps.GetAll(logger);

            return(task);


            // below needs sorting as getting a 500 on this atm so using above (add as project references)
            //var url = $"{UrlGetAllProviders}?code={UrlCode}";
            //var response = await _client.GetAsync(url);
            //var result = await response.Content.ReadAsAsync<IEnumerable<Provider>>();
            //return result;
        }