public void ParentContentValueResolver_IsValid_FalseWhenNoPropertyDescriptor()
        {
            _context = new FakeDittoValueResolverContext(_content, null);

            _sut = new ParentContentValueResolverShim(new DittoValueResolverAttribute(typeof(ParentContentValueResolver)), _content, _context);

            Assert.IsFalse(_sut.IsValid());
        }
        public void SetUp()
        {
            var content = ContentHelpers.FakeContent(123, "Fake Node 1", properties: new Collection<IPublishedProperty>
            {
                new FakePublishedProperty("myArchetypeProperty", ContentHelpers.Archetype, true)
            }, 
            parent: ContentHelpers.FakeContent(1234, "Fake Parent Node"));

            _content = new FakeModel(content);

            _propertyDescriptor = TypeDescriptor.GetProperties(_content)["TextString"];
            _context = new FakeDittoValueResolverContext(_content, _propertyDescriptor);
        }
        public void ParentContentValueResolver_IsValid_FalseWhenNoContentParent()
        {
            var content = ContentHelpers.FakeContent(123, "Fake Node 1", properties: new Collection<IPublishedProperty>
            {
                new FakePublishedProperty("myArchetypeProperty", ContentHelpers.Archetype, true)
            });

            _content = new FakeModel(content);

            _context = new FakeDittoValueResolverContext(_content, null);

            _sut = new ParentContentValueResolverShim(new DittoValueResolverAttribute(typeof(ParentContentValueResolver)), _content, _context);

            Assert.IsFalse(_sut.IsValid());
        }