Environment variables (#27)

This commit is contained in:
Federico Paolillo
2019-09-29 19:44:24 +02:00
committed by Alexey Golub
parent a6070332c9
commit 36436e7a4b
25 changed files with 544 additions and 169 deletions

View File

@@ -1,8 +1,9 @@
using System;
using NUnit.Framework;
using System;
using System.IO;
using CliFx.Services;
using CliFx.Tests.Stubs;
using CliFx.Tests.TestCommands;
using NUnit.Framework;
namespace CliFx.Tests
{
@@ -20,8 +21,8 @@ namespace CliFx.Tests
builder
.AddCommand(typeof(HelloWorldDefaultCommand))
.AddCommandsFrom(typeof(HelloWorldDefaultCommand).Assembly)
.AddCommands(new[] {typeof(HelloWorldDefaultCommand)})
.AddCommandsFrom(new[] {typeof(HelloWorldDefaultCommand).Assembly})
.AddCommands(new[] { typeof(HelloWorldDefaultCommand) })
.AddCommandsFrom(new[] { typeof(HelloWorldDefaultCommand).Assembly })
.AddCommandsFromThisAssembly()
.AllowDebugMode()
.AllowPreviewMode()
@@ -30,8 +31,9 @@ namespace CliFx.Tests
.UseVersionText("test")
.UseDescription("test")
.UseConsole(new VirtualConsole(TextWriter.Null))
.UseCommandFactory(schema => (ICommand) Activator.CreateInstance(schema.Type))
.UseCommandFactory(schema => (ICommand)Activator.CreateInstance(schema.Type))
.UseCommandOptionInputConverter(new CommandOptionInputConverter())
.UseEnvironmentVariablesProvider(new EnvironmentVariablesProviderStub())
.Build();
}