Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            ConsoleAppService consoleAppService = new ConsoleAppService();
            string            result            = consoleAppService.GetMessage();

            Console.WriteLine(result);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 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
         );
 }