Beispiel #1
0
        public void UpdateTest()
        {
            string          path          = Constants.AF_TABLE_CATEGORY_PATH;
            PITableCategory tableCategory = instance.GetByPath(path, null);

            tableCategory.Id          = null;
            tableCategory.Description = "New table category description";
            tableCategory.Links       = null;
            tableCategory.Path        = null;
            tableCategory.WebId       = null;
            instance.Update(webId, tableCategory);

            StandardPISystem.Refresh();
            AFCategory myCategory = AFObject.FindObject(path) as AFCategory;

            myCategory.Refresh();

            if (myCategory != null)
            {
                Assert.IsTrue(myCategory.Description == tableCategory.Description);
            }
        }
        public void UpdateTest()
        {
            string             path     = Constants.AF_ANALYSIS_CATEGORY_PATH;
            PIAnalysisCategory category = instance.Get(webId, null);

            category.WebId       = null;
            category.Id          = null;
            category.Links       = null;
            category.Path        = null;
            category.Description = "This is the new analysis category swagger description";
            instance.Update(webId, category);

            StandardPISystem.Refresh();
            AFCategory myCategory = AFObject.FindObject(path) as AFCategory;

            myCategory.Refresh();

            if (myCategory != null)
            {
                Assert.IsTrue(myCategory.Description == category.Description);
            }
        }
        public void UpdateTest()
        {
            string            path     = Constants.AF_ELEMENT_CATEGORY_PATH;
            PIElementCategory category = instance.GetByPath(path, null);

            category.Id          = null;
            category.Description = "New element category description";
            category.Links       = null;
            category.Path        = null;
            category.WebId       = null;
            instance.Update(webId, category);

            StandardPISystem.Refresh();
            AFCategory myCategory = AFObject.FindObject(path) as AFCategory;

            myCategory.Refresh();
            myCategory.Database.Refresh();
            if (myCategory != null)
            {
                Assert.IsTrue(myCategory.Description == category.Description);
            }
        }