Exemplo n.º 1
0
        async Task <long> ITestCaseSourceItem.RunTest(IHostingConfiguration hostingConfiguration)
        {
            HttpResponseMessage resp = null;

            try
            {
                resp = await hostingConfiguration.SendAsync(_path, _accepts).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                Console.Error.Write("Failed to send request {0} with error: {1}", _path, ex);
            }
            return(resp?.IsSuccessStatusCode == true ? resp.Content.Headers.ContentLength.Value : 0);
        }
Exemplo n.º 2
0
 public PackageRunner(string pathToStore, IPackagesInstances packagesInstances, IHostingConfiguration hostingConfiguration)
 {
     _pathToStore          = pathToStore;
     _packagesInstances    = packagesInstances;
     _hostingConfiguration = hostingConfiguration;
 }