Пример #1
0
        public void CanAddItemProperties()
        {
            string         testCatalogName = nameof(CanAddItemProperties);
            string         testItemName    = "testItem_".RandomLetters(6);
            CatalogService svc             = GetTestCatalogService(testCatalogName);

            CatalogDefinition   catalogDefinition = svc.FindCatalog(testCatalogName);
            ItemDefinition      item       = svc.AddItem(catalogDefinition, testItemName);
            List <ItemProperty> properties = svc.AddItemProperties(item, new { TailCount = 5, FallopianTubes = true }).ToList();

            Expect.AreEqual(2, properties.Count);
            Expect.AreEqual("5", properties.First(p => p.Name.Equals("TailCount")).Value);
            Expect.AreEqual("True", properties.First(p => p.Name.Equals("FallopianTubes")).Value);
        }