示例#1
0
        public void TestConexionCreateRepositoryConfig()
        {
            try
            {
                var builder = new ConfigurationBuilder()
                              .SetBasePath(Directory.GetCurrentDirectory())
                              .AddJsonFile("appsettings.Development.json");

                IConfiguration Configuration = builder.Build();

                ConfigUrlService configUrl   = new ConfigUrlService(Configuration);
                CallApiService   callService = new CallApiService();
                CallRepositoryConfigApiService callRepository = new CallRepositoryConfigApiService(callService, null, configUrl);
                RepositoryConfigViewModel      item           = new RepositoryConfigViewModel()
                {
                    Name       = "Prueba",
                    OauthToken = "qyueu11",
                    Url        = "url/prueba"
                };
                var resultado = callRepository.CreateRepositoryConfigView(item);
                Assert.True(true);
            }
            catch (Exception)
            {
                Assert.True(false);
            }
        }
 public void TestConexionListadoRepositoryConfig()
 {
     try
     {
         ConfigUrlService configUrl   = new ConfigUrlService();
         CallApiService   callService = new CallApiService(configUrl);
         CallRepositoryConfigApiService callRepository = new CallRepositoryConfigApiService(callService);
         var resultado = callRepository.GetRepositoryConfigs();
         Assert.True(true);
     }
     catch (Exception)
     {
         Assert.True(false);
     }
 }
 public void TestConexionDeleteRepositoryConfig()
 {
     try
     {
         ConfigUrlService configUrl   = new ConfigUrlService();
         CallApiService   callService = new CallApiService(configUrl);
         CallRepositoryConfigApiService callRepository = new CallRepositoryConfigApiService(callService);
         Guid id        = Guid.NewGuid();
         var  resultado = callRepository.DeleteRepositoryConfig(id);
         Assert.True(true);
     }
     catch (Exception)
     {
         Assert.True(false);
     }
 }
 public void TestConexionCreateRepositoryConfig()
 {
     try
     {
         ConfigUrlService configUrl   = new ConfigUrlService();
         CallApiService   callService = new CallApiService(configUrl);
         CallRepositoryConfigApiService callRepository = new CallRepositoryConfigApiService(callService);
         RepositoryConfigViewModel      item           = new RepositoryConfigViewModel()
         {
             Name       = "Prueba",
             OauthToken = "qyueu11",
             Url        = "url/prueba"
         };
         var resultado = callRepository.CreateRepositoryConfigView(item);
         Assert.True(true);
     }
     catch (Exception)
     {
         Assert.True(false);
     }
 }
示例#5
0
        public void TestConexionListadoRepositoryConfig()
        {
            try
            {
                var builder = new ConfigurationBuilder()
                              .SetBasePath(Directory.GetCurrentDirectory())
                              .AddJsonFile("appsettings.Development.json");

                IConfiguration Configuration = builder.Build();

                ConfigUrlService configUrl   = new ConfigUrlService(Configuration);
                CallApiService   callService = new CallApiService();
                CallRepositoryConfigApiService callRepository = new CallRepositoryConfigApiService(callService, null, configUrl);
                var resultado = callRepository.GetRepositoryConfigs();
                Assert.True(true);
            }
            catch (Exception)
            {
                Assert.True(false);
            }
        }