Пример #1
0
        static async Task Main(string[] args)
        {
            // Poor man DI
            IKeyRepository         keyRepository = new InMemoryKeyRepository();
            IApplicationRepository appRepo       = new InMemoryApplicationRepository();

            var httpClient = new System.Net.Http.HttpClient();

            httpClient.BaseAddress = new Uri("http://localhost:51313");

            var apiClient = new KeyCheckerApiClient(httpClient);

            var authKeyValidator = new AuthKeyValidator(keyRepository, appRepo, null);

            var program = new Program(authKeyValidator, apiClient);

            // Собственно выполнение самой проги
            await program.ExecuteTestSequenceAsync();

            Console.ReadLine();
        }
 public void BeforeTest()
 {
     _applicationRepository = new InMemoryApplicationRepository();
     _resetEnvironmentsSortOrderController = new ResetEnvironmentsSortOrderController(_applicationRepository);
 }
Пример #3
0
 public void BeforeTest()
 {
     _appApplicationRepository = new InMemoryApplicationRepository();
     _toggleScheduleRepository = new InMemoryRepository <ToggleSchedule>();
 }