private void DeleteCatalog(String catalog_name) { CatalogService service = new CatalogService(); service.DeleteCatalog(catalog_name); LoadAllCatalogs(); }
public async Task <ActionResult> FilterCatalogs(Guid id) { var username = User.Claims.FirstOrDefault(x => x.Type == "FullName").Value; // Calling method that will delete Catalog from DB await CatalogService.DeleteCatalog(id, username); // Returning filtered Catalog list return(Ok()); }
public void CanDeleteCatalog() { string catalogName = "Test Catalog To Find ".RandomLetters(10); CatalogService svc = _serviceRegistry.Get <CatalogService>(); CatalogDefinition catalog = svc.CreateCatalog(catalogName); CatalogDefinition gotCatalog = svc.GetCatalog(catalog.Cuid); Expect.IsNotNull(gotCatalog, "gotCatalog was null"); Expect.AreEqual(catalog.Cuid, gotCatalog.Cuid); svc.DeleteCatalog(gotCatalog.Cuid); gotCatalog = svc.GetCatalog(catalog.Cuid); Expect.IsNull(gotCatalog); }
public void CanDeleteCatalog() { string testCatalogName = nameof(CanDeleteCatalog); CatalogService svc = GetTestCatalogService(testCatalogName); CatalogDefinition catalogDefinition = svc.FindCatalog(testCatalogName); Expect.IsNotNull(catalogDefinition); svc.DeleteCatalog(catalogDefinition); catalogDefinition = svc.FindCatalog(testCatalogName); Expect.IsNull(catalogDefinition); }
public void TestDeleteCatalog() { CatalogService service = new CatalogService(); service.DeleteCatalog("test cata for cascade"); }