示例#1
0
        private void DeleteCatalog(String catalog_name)
        {
            CatalogService service = new CatalogService();

            service.DeleteCatalog(catalog_name);
            LoadAllCatalogs();
        }
示例#2
0
        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());
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
        public void TestDeleteCatalog()
        {
            CatalogService service = new CatalogService();

            service.DeleteCatalog("test cata for cascade");
        }