private void Generate_AddsAndPassesAttributeToChildren(string attributeName, Action generateDelegate) { Generator = new AttributeCodeGenerator(attributeName, Configuration, spy1, spy2); generateDelegate(); var attribute = FindAttribute(attributeName); Assert.AreSame(attribute, spy1.CodeObjects[0]); Assert.AreSame(attribute, spy2.CodeObjects[0]); }
private void SetupProperty() { ContentType = new MediaType(); Generator = new AttributeCodeGenerator("GenericProperty", Configuration); Candidate = new CodeMemberProperty(); }
private void SetupMediaType() { ContentType = new MediaType(); Generator = new AttributeCodeGenerator("MediaType", Configuration); Candidate = new CodeTypeDeclaration(); }