static void Main(string[] args) { Console.WriteLine("Gherkin parser import tool:"); Console.WriteLine(" + adds signing for the assembly"); Console.WriteLine(" + generates Language.xml from the parser"); Console.WriteLine(); Consolery.Run(typeof(Program), args); return; }
private static void Main(string[] args) { Trace.Listeners.Add(new ConsoleTraceListener()); Log.WriteLine($"Altairis AutoACME Manager version {Assembly.GetExecutingAssembly().GetName().Version}"); Log.WriteLine("Copyright © Michal A. Valášek - Altairis and contributors, 2017-2019"); Log.WriteLine("www.autoacme.net | www.rider.cz | www.altairis.cz"); Log.WriteLine(); Consolery.Run(); }
static void Main(string[] args) { Trace.Listeners.Add(new ConsoleTraceListener()); Trace.IndentSize = 2; Trace.WriteLine($"Altairis AutoACME Manager version {System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}"); Trace.WriteLine("Copyright (c) Michal A. Valasek - Altairis, 2017"); Trace.WriteLine("www.autoacme.net | www.rider.cz | www.altairis.cz"); Trace.WriteLine(string.Empty); Consolery.Run(); }
static void Main(string[] args) { Trace.Listeners.Add(new ConsoleTraceListener()); Log.WriteLine($"Altairis AutoACME IIS Synchronization Tool version {System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}"); Log.WriteLine("Copyright (c) Michal A. Valasek - Altairis, 2017"); Log.WriteLine("www.autoacme.net | www.rider.cz | www.altairis.cz"); Log.WriteLine(); Consolery.Run(); }
static void Main(string[] args) { Console.WriteLine("Altairis DB>doc version {0:4}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); Console.WriteLine("Copyright (c) Altairis, 2011 | www.altairis.cz | SqlDbDoc.codeplex.com"); Console.WriteLine(); // Add console trace listener Trace.Listeners.Add(new ConsoleTraceListener()); // Run actions Consolery.Run(); }
public void RunConsoleProgramWithoutOptionalParameters() { Consolery.Run(typeof(ManyParametersProgram), new[] { "string", "1", "true" }); Assert.That(_verifier.sParameter, Is.EqualTo("string")); Assert.That(_verifier.iParameter, Is.EqualTo(1)); Assert.That(_verifier.bParameter, Is.EqualTo(true)); Assert.That(_verifier.osParameter, Is.EqualTo("0")); Assert.That(_verifier.oiParameter, Is.EqualTo(0)); Assert.That(_verifier.obParameter, Is.EqualTo(false)); }
public void NegativeBooleanParameter() { Consolery.Run(typeof(ManyParametersProgram), new[] { "string", "1", "true", "/-ob" }); Assert.That(_verifier.sParameter, Is.EqualTo("string")); Assert.That(_verifier.iParameter, Is.EqualTo(1)); Assert.That(_verifier.bParameter, Is.EqualTo(true)); Assert.That(_verifier.osParameter, Is.EqualTo("0")); Assert.That(_verifier.oiParameter, Is.EqualTo(0)); Assert.That(_verifier.obParameter, Is.EqualTo(false)); }
public void ManyParameters() { Consolery.Run(typeof(ManyParametersProgram), new[] { "string", "1", "true", "/os:string", "/oi:1", "/ob" }); Assert.That(_verifier.sParameter, Is.EqualTo("string")); Assert.That(_verifier.iParameter, Is.EqualTo(1)); Assert.That(_verifier.bParameter, Is.EqualTo(true)); Assert.That(_verifier.osParameter, Is.EqualTo("string")); Assert.That(_verifier.oiParameter, Is.EqualTo(1)); Assert.That(_verifier.obParameter, Is.EqualTo(true)); }
public void ShouldShowDefaultValueForOptionalParameter() { Consolery.Run(typeof(OneActionProgramWithOptionalParameters), new[] { "help", "Test" }, _messenger); var console = ConsoleOutput(); Assert.That( console.Contains( @"usage: oneactionprogramwithoptionalparameters [/parameter1:value] [/param2:number] [/parameter1:value] param1 desc default value: 'value1' [/param2:number] desc2 default value: 42")); }
static void Main(string[] args) { Log.Logger = new LoggerConfiguration() .WriteTo.Console() .WriteTo.File("log-.txt", rollingInterval: RollingInterval.Day) .CreateLogger(); _sorter = new MusicSorter(); Log.Information("Music Sorter v0.1a"); Log.Information("--------------------------------------"); Consolery.Run(typeof(Program), args); }
public void NotAllRequiredParametersAreSet() { Consolery.Run(typeof(ManyParametersProgram), new[] { "test" }, _messenger); var console = ConsoleOutput(); Assert.That(console.Contains( @"usage: manyparametersprogram sParameter iParameter bParameter [/os:value] [/oi:number] [/ob] [/os:value] default value: '0' [/oi:number] default value: 0 [/ob] default value: False Error: Not all required parameters are set")); }
public void WhenTargetMethodThrowsAnException() { Exception exception = null; try { Consolery.Run(typeof(ExceptionalProgram), new[] { "/-parameter" }); } catch (Exception e) { exception = e; } Assert.That(exception, Is.Not.Null); Assert.That(exception.GetType(), Is.EqualTo(typeof(SpecificException))); }
static void Main(string[] args) { Console.WriteLine("Altairis DB>doc version {0:4}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); Console.WriteLine("Copyright (c) Altairis, 2011 | www.altairis.cz | SqlDbDoc.codeplex.com"); Console.WriteLine("Modifications by HAVIT, 2015 | www.havit.eu | https://github.com/hakenr/SqlDbDoc"); Console.WriteLine("Modifications by MissAmberInSeattle, 2018"); Console.WriteLine(); // Add console trace listener Trace.Listeners.Add(new ConsoleTraceListener()); try { // Run actions Consolery.Run(); Console.WriteLine("Complete. Press enter to finish."); Console.ReadLine(); } catch (Exception ex) { Console.Error.WriteLine(ex); } }
private static void Main(string[] args) { Consolery.Run(typeof(Program), args); return; }
private static void Main(string[] args) => Consolery.Run();
public void WithoutMethods() { Consolery.Run(typeof(WithoutMethodsProgram), new[] { "string" }, _messenger); }
public void ShouldCorrectlyConvertToDateTimeFromOptionalAttributeDefaultValue() { Consolery.Run(typeof(OptionalDateTimeProgram), new[] { "01-01-2009", "/dtDate:31-12-2008" }); Assert.That(_verifier.date, Is.EqualTo(new DateTime(2008, 12, 31))); }
public void WhenSpecifiedCaseForOptionalArgumentInconsistentWithActualParameters() { Consolery.Run(typeof(OnlyOptionalParametersProgram), new[] { "/-PARAMETER" }); Assert.That(_verifier.parameter, Is.EqualTo(false)); }
public void WhenMetadataValidationFailsShouldSetErrorCode() { Consolery.Run(typeof(ExceptionalProgram), new[] { "wrong" }); Assert.That(Environment.ExitCode, Is.EqualTo(1)); }
public void EnumDecimalTest() { Consolery.Run(typeof(EnumDecimalProgram), new[] { "1" }); Assert.That(_verifier.d, Is.EqualTo(1)); }
public void OnlyOptionalParametersSpecified() { Consolery.Run(typeof(OnlyOptionalParametersProgram), new string[] { }); Assert.That(_verifier.parameter, Is.EqualTo(true)); }
public void NullableParameter() { Consolery.Run(typeof(NullableParameterProgram), new[] { "10" }); Assert.That(_verifier.i, Is.EqualTo(10)); }
public void EnumParameterTest() { Consolery.Run(typeof(EnumParameterProgram), new[] { "One" }); Assert.That(_verifier.testEnum, Is.EqualTo(TestEnum.One)); }
public void ShouldShowHelpForAParticularMessage() { Consolery.Run(typeof(TwoActionsProgram), new[] { "help", "Test2" }, _messenger); Assert.That(ConsoleOutput().Contains("test2 parameter")); }
static void Main(string[] args) { Consolery.Run(typeof(FileSystemEntriesProcessor), args); }
static void Main(string[] args) { Consolery.Run(typeof(MainClass), args); }
public static void Main(string[] args) { Consolery.Run(typeof(Program), args); }
public void ShouldWorkWithoutArgumentsInAction() { Consolery.Run(typeof(WithoutArgumentsProgram), new[] { "Test" }); Assert.That(_verifier.TestCalled, Is.True); }
static void Main(string[] args) { Consolery.Run(); }
public void OneParameter() { Consolery.Run(typeof(OneParameterProgram), new[] { "parameter" }); Assert.That(_verifier.parameter, Is.EqualTo("parameter")); }