mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Environment variables (#27)
This commit is contained in:
committed by
Alexey Golub
parent
a6070332c9
commit
36436e7a4b
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user