private static void InitializeProgram(string[] args) { _messages = new Messages(); _counter = new Counter.Counter(); _azureDevOpsColors = new AzureDevOpsColors(); _isLocal = Environment.GetEnvironmentVariable(SystemTeamProjectName) == null; _inputOptions = new CommandLineArgumentsParser(CreateCommandLineAccess(_isLocal, _messages, _azureDevOpsColors), _messages).Parse(args); InitializeAccesses(); InitializeManagers(); }
private static void InitializeProgram(string[] args) { _messages = new Messages(); _counter = new Counter.Counter(); _azureDevOpsColors = new AzureDevOpsColors(); _isLocal = Environment.GetEnvironmentVariable(SystemTeamProjectName) == null; _inputOptions = new CommandLineArgumentsParser(CreateCommandLineAccess(_isLocal, _messages, _azureDevOpsColors), _messages).Parse(args); _testFrameWorkStrategy = RetrieveTestFrameworkStrategies().Single(x => x.TestFrameworkType == Enum.Parse <TestFrameworkType>(_inputOptions.TestFrameworkType, true)); InitializeAccesses(); InitializeManagers(); }
public void CommandLineAccess_WriteToConsole_SuccessWhereIsLocalIsTrue() { // Arrange const bool isLocal = true; const string messageType = "STAGE"; const string message = "Trying to parse arguments..."; var messages = new Messages(); var azureDevOpsColors = new AzureDevOpsColors(); var target = new OutputAccessFactory(isLocal, messages, azureDevOpsColors).Create(); // Act Action actual = () => target.WriteToConsole(message, messageType); // Assert actual.Should().NotThrow(); }
private static CommandLineAccess CreateCommandLineAccess(bool isLocal, Messages messages, AzureDevOpsColors azureDevOpsColors) { return(new CommandLineAccess(isLocal, messages, azureDevOpsColors)); }
public OutputAccessFactory(bool isLocal, Messages messages, AzureDevOpsColors azureDevOpsColors) { _isLocal = isLocal; _messages = messages; _azureDevOpsColors = azureDevOpsColors; }