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 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()); }
public void ParentContentValueResolver_IsValid_TrueWithAllFields() { _sut = new ParentContentValueResolverShim(new DittoValueResolverAttribute(typeof(ParentContentValueResolver)), _content, _context); Assert.IsTrue(_sut.IsValid()); }