static void Main(string[] args) { ConsoleAppService consoleAppService = new ConsoleAppService(); string result = consoleAppService.GetMessage(); Console.WriteLine(result); }
public static async Task Main(string[] args) { ServiceProvider serviceProvider = new ServiceCollection() .AddConsoleModule() .AddAppModule() // Replace services that have already been added .Replace(ServiceDescriptor.Scoped <IQuestionClient, TestQuestionClient>()) .BuildServiceProvider(); ConsoleAppService consoleAppService = serviceProvider.GetService <ConsoleAppService>(); await consoleAppService.Run(args); }
public void Setup() { _dateParserMock = new Mock <IDateParser>(); _daySummaryServiceMock = new Mock <IDaySummaryService>(); _tagFormatterMock = new Mock <ITagFormatter>(); _testAppOutput = new TestAppOutput(); _consoleAppService = new ConsoleAppService( _dateParserMock.Object, _daySummaryServiceMock.Object, _tagFormatterMock.Object, _testAppOutput ); }