Example #1
0
        public HelpDialogTest()
        {
            _testContainerBuilder.RegisterType <HelpDialog>();
            _actionWebService = A.Fake <IActionWebService>();
            _testContainerBuilder.RegisterInstance(_actionWebService).As <IActionWebService>();
            _logger = A.Fake <ILogger <HelpDialog> >();
            _testContainerBuilder.RegisterInstance(_logger).As <ILogger <HelpDialog> >();

            _container = _testContainerBuilder.Build();
            _target    = _container.Resolve <HelpDialog>();
        }
Example #2
0
        static async Task RunAsync(string[] args)
        {
            Parser.Default.ParseArguments <Options>(args)
            .WithParsed(async o => {
                httpClient.BaseAddress = new Uri(o.APIUrl);
                httpClient.DefaultRequestHeaders.Accept.Clear();
                _actionWebService = new ActionWebService(httpClient);

                try
                {
                    await InsertRandomPosition(o.GameId, o.MinTeamId, o.MaxTeamId, o.SeedLatitude, o.SeedLongitude, o.TimerInterval);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            });

            Console.ReadLine();
        }
Example #3
0
 public StartDialog(IActionWebService actionWebService, ILogger <StartDialog> logger) : base(logger)
 {
     _actionWebService = actionWebService;
 }
Example #4
0
 public EndDialog(IActionWebService actionWebService, ILogger <EndDialog> logger) : base(logger)
 {
     _actionWebService = actionWebService;
 }
Example #5
0
 public ReceiveLocationDialog(IActionWebService actionWebService, ILogger <ReceiveLocationDialog> logger) : base(logger)
 {
     _actionWebService = actionWebService;
 }