public void Should_Discover_And_Load_Local_Parts() { var cmdRepository = new CommandRepository(); Assert.IsNotNull(cmdRepository.Commands); Assert.AreEqual(2, cmdRepository.Commands.Count); }
public void Should_Be_Able_To_Retrieve_Null_For_An_Unknown_Command() { var cmdRepository = new CommandRepository(); ICommand results = cmdRepository.GetCommand("ThisIsNotACommand"); Assert.IsNull(results); }
public void Should_Be_Able_To_Retrieve_A_Command_By_CommandName() { var cmdRepository = new CommandRepository(); ICommand results = cmdRepository.GetCommand("TestCommand"); Assert.IsNotNull(results); Assert.IsTrue(results is MockCommand1); }
/// <summary> /// Program constructor, instantiates primary repository objects. /// </summary> private Program(IConfigurationManager configManager) { _commandRepo = new CommandRepository(); _logger = new LogRepository(); string logFullErrorsSetting = configManager.AppSettings[AppSettingKeys.LogFullErrors]; bool.TryParse(logFullErrorsSetting, out _logFullErrors); _keepConsoleOpen = ProgramLaunchedInSeparateConsoleWindow(); }