Exemplo n.º 1
0
        public void Configure_ConfigureCalled_UmbracoInfoConfigurationReturned()
        {
            //Assign
            var attr         = new UmbracoInfoAttribute();
            var propertyInfo = typeof(StubClass).GetProperty("DummyProperty");

            //Act
            var result = attr.Configure(propertyInfo) as UmbracoInfoConfiguration;

            //Assert
            result.Should().NotBeNull();
            result.Type.ShouldBeEquivalentTo(UmbracoInfoType.NotSet);
        }
Exemplo n.º 2
0
        public void Configure_TypeSet_TypeSetOnConfiguration()
        {
            //Assign
            var attr         = new UmbracoInfoAttribute();
            var propertyInfo = typeof(StubClass).GetProperty("DummyProperty");

            attr.Type = UmbracoInfoType.ContentTypeName;

            //Act
            var result = attr.Configure(propertyInfo) as UmbracoInfoConfiguration;

            //Assert
            result.Should().NotBeNull();
            result.Type.ShouldBeEquivalentTo(UmbracoInfoType.ContentTypeName);
        }