private TestNodePlatform CreateNodePlatform( string[] supportedNodeVersions = null, string defaultVersion = null, string detectedVersion = null, BuildScriptGeneratorOptions commonOptions = null, NodeScriptGeneratorOptions nodeScriptGeneratorOptions = null) { nodeScriptGeneratorOptions = nodeScriptGeneratorOptions ?? new NodeScriptGeneratorOptions(); commonOptions = commonOptions ?? new BuildScriptGeneratorOptions(); var versionProvider = new TestNodeVersionProvider(supportedNodeVersions, defaultVersion); var environment = new TestEnvironment(); var detector = new TestNodePlatformDetector(detectedVersion: detectedVersion); var platformInstaller = new NodePlatformInstaller( Options.Create(commonOptions), NullLoggerFactory.Instance); return(new TestNodePlatform( Options.Create(commonOptions), Options.Create(nodeScriptGeneratorOptions), versionProvider, NullLogger <NodePlatform> .Instance, detector, environment, platformInstaller)); }
public TestNodePlatform( IOptions <BuildScriptGeneratorOptions> cliOptions, IOptions <NodeScriptGeneratorOptions> nodeScriptGeneratorOptions, INodeVersionProvider nodeVersionProvider, ILogger <NodePlatform> logger, INodePlatformDetector detector, IEnvironment environment, NodePlatformInstaller nodePlatformInstaller) : base( cliOptions, nodeScriptGeneratorOptions, nodeVersionProvider, logger, detector, environment, nodePlatformInstaller) { }
private TestNodePlatform CreateNodePlatform( BuildScriptGeneratorOptions commonOptions, NodeScriptGeneratorOptions nodeScriptGeneratorOptions, NodePlatformInstaller platformInstaller, string detectedVersion = null) { var environment = new TestEnvironment(); var versionProvider = new TestNodeVersionProvider(); var detector = new TestNodePlatformDetector(detectedVersion: detectedVersion); return(new TestNodePlatform( Options.Create(commonOptions), Options.Create(nodeScriptGeneratorOptions), versionProvider, NullLogger <NodePlatform> .Instance, detector, environment, platformInstaller)); }
private TestNodePlatform CreateNodePlatform( BuildScriptGeneratorOptions commonOptions, NodeScriptGeneratorOptions nodeScriptGeneratorOptions, NodePlatformInstaller platformInstaller) { var environment = new TestEnvironment(); var versionProvider = new TestNodeVersionProvider(); var detector = new TestNodeLanguageDetector( versionProvider, Options.Create(nodeScriptGeneratorOptions), NullLogger <NodeLanguageDetector> .Instance, environment, new TestStandardOutputWriter()); return(new TestNodePlatform( Options.Create(commonOptions), Options.Create(nodeScriptGeneratorOptions), versionProvider, NullLogger <NodePlatform> .Instance, detector, environment, platformInstaller)); }