Exemplo n.º 1
0
 public IActionResult StartImport([FromBody] IList <int> externalRepositoryIds)
 {
     try
     {
         m_mainImportManager.ImportFromResources(externalRepositoryIds, m_authenticationManager.GetCurrentUserId());
         return(Ok());
     }
     catch (HttpErrorCodeException exception)
     {
         return(StatusCode((int)exception.StatusCode, exception.Message));
     }
 }
Exemplo n.º 2
0
 public void StartImportWithZeroRepositories()
 {
     Assert.ThrowsException <ArgumentNullException>(() => m_mainImportManager.ImportFromResources(new List <int>(), 1));
     Assert.AreEqual(false, m_mainImportManager.IsImportRunning);
 }