public void Configure_ConfigurationIsOfCorrectType_NoExceptionThrown() { //Assign var attr = new UmbracoTypeAttribute(); var config = new UmbracoTypeConfiguration(); var type = typeof(StubClass); //Act attr.Configure(type, config); //Assert config.Type.ShouldBeEquivalentTo(type); }
public void Configure_AttributeHasContentTypeAlias_ContentTypeAliasSetOnConfig() { //Assign var attr = new UmbracoTypeAttribute(); var config = new UmbracoTypeConfiguration(); var type = typeof(StubClass); var contentTypeAliasExpected = "test"; attr.ContentTypeAlias = contentTypeAliasExpected; //Act attr.Configure(type, config); //Assert config.Type.ShouldBeEquivalentTo(type); config.ContentTypeAlias.ShouldBeEquivalentTo(contentTypeAliasExpected); }