private DotNetCorePlatform CreatePlatform(
            string projectFile = null,
            Dictionary <string, string> supportedVersions = null,
            string defaultVersion = null)
        {
            var projectFileProvider = new TestProjectFileProvider(projectFile);
            var detector            = new DotNetCorePlatformDetector(
                projectFileProvider,
                NullLogger <DotNetCorePlatformDetector> .Instance);

            defaultVersion    = defaultVersion ?? DotNetCoreRunTimeVersions.NetCoreApp31;
            supportedVersions = supportedVersions ?? new Dictionary <string, string>
            {
                { defaultVersion, defaultVersion },
            };
            var versionProvider = new TestDotNetCoreVersionProvider(
                supportedVersions,
                defaultVersion);
            var commonOptions = new BuildScriptGeneratorOptions();
            var dotNetCoreScriptGeneratorOptions = new DotNetCoreScriptGeneratorOptions();
            var installer = new DotNetCorePlatformInstaller(
                Options.Create(commonOptions),
                versionProvider,
                NullLoggerFactory.Instance);
            var globalJsonSdkResolver = new GlobalJsonSdkResolver(NullLogger <GlobalJsonSdkResolver> .Instance);

            return(new TestDotNetCorePlatform(
                       versionProvider,
                       projectFileProvider,
                       detector,
                       Options.Create(commonOptions),
                       Options.Create(dotNetCoreScriptGeneratorOptions),
                       installer,
                       globalJsonSdkResolver));
        }
 public TestDotNetCorePlatform(
     IDotNetCoreVersionProvider versionProvider,
     DefaultProjectFileProvider projectFileProvider,
     DotNetCorePlatformDetector detector,
     IOptions <BuildScriptGeneratorOptions> cliOptions,
     IOptions <DotNetCoreScriptGeneratorOptions> dotNetCoreScriptGeneratorOptions,
     DotNetCorePlatformInstaller platformInstaller,
     GlobalJsonSdkResolver globalJsonSdkResolver)
     : base(
         versionProvider,
         projectFileProvider,
         NullLogger <DotNetCorePlatform> .Instance,
         detector,
         cliOptions,
         dotNetCoreScriptGeneratorOptions,
         platformInstaller,
         globalJsonSdkResolver)
 {
 }