public void GivenOneHtmlGithubUrl_WhenCorrection_ThenTheCorrectedUrl_ShouldBeOnPointingToItsDownload()
        {
            var uriCorrector = new UriCorrector(Mock.Of <ILogger <UriCorrector> >());
            var input        = new Uri("https://github.com/dotnet/corefx/blob/master/LICENSE.TXT");
            var corrected    = uriCorrector.Correct(new[] { input });

            corrected.Should().OnlyContain(i =>
                                           i.Value.corrected == new Uri("https://raw.githubusercontent.com/dotnet/corefx/master/LICENSE.TXT") &&
                                           i.Value.wasCorrected);
        }
Exemplo n.º 2
0
 public Program(UriCorrector uriCorrector, LicenseLocator licenseLocator, IFileSystem fileSystem,
                ProjectDependencyResolver projectDependencyResolver, LicenseDownloader licenseDownloader, IReporter reporter)
 {
     _uriCorrector              = uriCorrector;
     _licenseLocator            = licenseLocator;
     _fileSystem                = fileSystem;
     _projectDependencyResolver = projectDependencyResolver;
     _downloader                = licenseDownloader;
     _reporter = reporter;
 }
Exemplo n.º 3
0
 public Program(UriCorrector uriCorrector, PackageLocator packageLocator, IFileSystem fileSystem,
                ProjectDependencyResolver projectDependencyResolver, LicenseDownloader licenseDownloader, IReporter reporter, IEntryPointLocator entryPointLocator)
 {
     _uriCorrector              = uriCorrector;
     _packageLocator            = packageLocator;
     _fileSystem                = fileSystem;
     _projectDependencyResolver = projectDependencyResolver;
     _downloader                = licenseDownloader;
     _reporter          = reporter;
     _entryPointLocator = entryPointLocator;
 }