Exemple #1
0
            public void ConvertsFlatMetadataCollectionToList()
            {
                var objectWithMetadata = DictionaryMetadataFactory.CreateFlatObjectWithMetadata();

                var flatList = objectWithMetadata.ToStaticMetadataList();

                Assert.AreEqual(3, flatList.Count);
                Assert.AreEqual(null, flatList[0].Value);
                Assert.AreEqual(42, flatList[1].Value);
                Assert.AreEqual("works", flatList[2].Value);
            }
Exemple #2
0
            public void ConvertsFlatMetadataCollectionToList()
            {
                var objectWithMetadata = DictionaryMetadataFactory.CreateFlatObjectWithMetadata();

                var dictionary = objectWithMetadata.ToStaticMetadataDictionary();

                Assert.AreEqual(3, dictionary.Count);
                Assert.AreEqual(null, dictionary["StringProperty"].Value);
                Assert.AreEqual(42, dictionary["IntProperty"].Value);
                Assert.AreEqual("works", dictionary["ExistingProperty"].Value);
            }