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); }
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); }