public void ManyNestedTest()
        {
            (_, var contentType2) = CreateContentTypes();

            // nested many converter returns the proper value clr type IEnumerable<TestModel>, and cache level
            Assert.AreEqual(typeof(IEnumerable <TestElementModel>), contentType2.GetPropertyType("property2").ClrType);
            Assert.AreEqual(PropertyCacheLevel.Element, contentType2.GetPropertyType("property2").CacheLevel);

            var key     = Guid.NewGuid();
            var keyA    = Guid.NewGuid();
            var keyB    = Guid.NewGuid();
            var content = new TestPublishedContent(contentType2, key, new[]
            {
                new TestPublishedProperty(contentType2.GetPropertyType("property2"), $@"[
                    {{ ""key"": ""{keyA}"", ""propertyN1"": ""foo"", ""ncContentTypeAlias"": ""contentN1"" }},
                    {{ ""key"": ""{keyB}"", ""propertyN1"": ""bar"", ""ncContentTypeAlias"": ""contentN1"" }}
                ]")
            },
                                                   Mock.Of <IUmbracoContextAccessor>());
            var value = content.Value("property2");

            // nested many converter returns proper IEnumerable<TestModel> value
            Assert.IsInstanceOf <IEnumerable <IPublishedElement> >(value);
            Assert.IsInstanceOf <IEnumerable <TestElementModel> >(value);
            var valueM = ((IEnumerable <TestElementModel>)value).ToArray();

            Assert.AreEqual("foo", valueM[0].PropValue);
            Assert.AreEqual(keyA, valueM[0].Key);
            Assert.AreEqual("bar", valueM[1].PropValue);
            Assert.AreEqual(keyB, valueM[1].Key);
        }
        public void SingleNestedTest()
        {
            (var contentType1, _) = CreateContentTypes();

            // nested single converter returns the proper value clr type TestModel, and cache level
            Assert.AreEqual(typeof(TestElementModel), contentType1.GetPropertyType("property1").ClrType);
            Assert.AreEqual(PropertyCacheLevel.Element, contentType1.GetPropertyType("property1").CacheLevel);

            var key     = Guid.NewGuid();
            var keyA    = Guid.NewGuid();
            var content = new TestPublishedContent(contentType1, key, new[]
            {
                new TestPublishedProperty(contentType1.GetPropertyType("property1"), $@"[
                    {{ ""key"": ""{keyA}"", ""propertyN1"": ""foo"", ""ncContentTypeAlias"": ""contentN1"" }}
                ]")
            }, Mock.Of <IUmbracoContextAccessor>());
            var value = content.Value("property1");

            // nested single converter returns proper TestModel value
            Assert.IsInstanceOf <TestElementModel>(value);
            var valueM = (TestElementModel)value;

            Assert.AreEqual("foo", valueM.PropValue);
            Assert.AreEqual(keyA, valueM.Key);
        }