예제 #1
0
        public async Task InitTests()
        {
            _client = new Certify.Client.CertifyServiceClient(new ServiceConfigManager());

            // create API server instance
            if (_svc == null)
            {
                _svc = new Certify.Service.OwinService();
                _svc.Start();

                await Task.Delay(2000);

                await _client.GetAppVersion();
            }
        }
예제 #2
0
        private async void StartService()
        {
            try
            {
                Logger.PrintText(new Run("Iniciando serviço da API Web..."), new Run(" --> "), new DateOptions(TextDecorationOptions.BOLD));
                bool status = OwinService.Start();
                await ServiceStatusUC.ChangeStatus(status);

                Logger.PrintText(new Run("Serviço da API Web inicializado..."), new Run(" --> "), new DateOptions(TextDecorationOptions.BOLD));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Erro ao iniciar serviço", MessageBoxButton.OK, MessageBoxImage.Error);
                Logger.PrintText(new Run("Erro na inicialização serviço da API Web..."), new Run(" --> "), new DateOptions(TextDecorationOptions.BOLD));
            }
        }
 public ApplicationFixture()
 {
     _owinService = new OwinService();
     _owinService.Start();
 }