private string AttributeParsingHelper(Type type) { ContentTypeManagerAccessor ctmAcc = new ContentTypeManagerAccessor(ContentTypeManager.Current); NodeTypeRegistrationAccessor ntrAcc = ctmAcc.ParseAttributes(type); return(ntrAcc.ToString()); }
public void Attr_ContentHandlerMustHaveAttribute() { Type type = typeof(SenseNet.ContentRepository.Tests.ContentHandlers.BadHandler2); ContentTypeManagerAccessor ctmAcc = new ContentTypeManagerAccessor(ContentTypeManager.Current); NodeTypeRegistrationAccessor ntrAcc = ctmAcc.ParseAttributes(type); Assert.IsNull(ntrAcc); }
public void Attr_ContentHandlerMustBeANode() { Type type = typeof(SenseNet.ContentRepository.Tests.ContentHandlers.BadHandler1); ContentTypeManagerAccessor ctmAcc = new ContentTypeManagerAccessor(ContentTypeManager.Current); try { NodeTypeRegistrationAccessor ntrAcc = ctmAcc.ParseAttributes(type); } catch (Exception e) { Exception ee = e.InnerException; Assert.IsTrue(ee is ContentRegistrationException); } }