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 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); } }