Exemple #1
0
        public void CreateClassWithTranslation()
        {
            oms.BeginTransaction();

            InstanceHandle key = oms.CreateClass(TEST_CLASS_GUID, TEST_CLASS_NAME, TEST_CLASS_TITLE);

            oms.CommitTransaction();


            string name = oms.GetAttributeValue <string>(key, oms.GetInstance(KnownAttributeGuids.Text.Name));

            Assert.AreEqual(TEST_CLASS_NAME, name);

            string title = oms.GetTranslationValue(key, oms.GetInstance(KnownRelationshipGuids.Class__has_title__Translatable_Text_Constant), oms.GetInstance(KnownInstanceGuids.Languages.English));

            Assert.AreEqual(TEST_CLASS_TITLE, title);
        }
Exemple #2
0
 private static void TestExisting(Oms oms)
 {
     InstanceHandle ihInventItem = oms.GetInstance(LocalInstanceGuids.Classes.InventoryItem);
     string         title        = oms.GetInstanceTitle(ihInventItem);
     string         title2       = oms.GetTranslationValue(ihInventItem, oms.GetInstance(KnownRelationshipGuids.Class__has_title__Translatable_Text_Constant), oms.GetInstance(KnownInstanceGuids.Languages.English));
 }