+2008-04-08 Jb Evain <jbevain@novell.com>
+
+ * CodeGeneratorFromTypeTest.cs: add test for abstract properties.
+
2008-01-27 Gert Driesen <drieseng@users.sourceforge.net>
* CodeGeneratorFromExpressionTest.cs: Copied some tests from VB, and
"}}{0}", NewLine), code);
}
+ [Test]
+ public void AbstractPropertyTest ()
+ {
+ string code = GenerateAbstractProperty (Options);
+ Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+ "public abstract class Test1 {{{0}" +
+ " {0}" +
+ " public abstract string Name {{{0}" +
+ " get;{0}" +
+ " set;{0}" +
+ " }}{0}" +
+ "}}{0}", NewLine), code);
+ }
+
[Test]
public override void PropertyMembersTypeTest1 ()
{
+2008-04-08 Jb Evain <jbevain@novell.com>
+
+ * CodeGeneratorFromTypeTestBase.cs: add a generator for
+ abstract properties.
+
2008-01-29 Zoltan Varga <vargaz@gmail.com>
* ExecutorTest.cs (ExecWait_NullTempFileCollection): Fix the cmdNoFound case.
return GenerateCodeFromType (TypeDeclaration, options);
}
+ protected string GenerateAbstractProperty (CodeGeneratorOptions options)
+ {
+ TypeDeclaration.Name = "Test1";
+ TypeDeclaration.TypeAttributes = TypeAttributes.Abstract | TypeAttributes.Public;
+
+ CodeMemberProperty property = new CodeMemberProperty ();
+ property.Name = "Name";
+ property.Attributes = MemberAttributes.Public | MemberAttributes.Abstract;
+ property.HasGet = true;
+ property.HasSet = true;
+ property.Type = new CodeTypeReference (typeof (string));
+
+ TypeDeclaration.Members.Add (property);
+
+ return GenerateCodeFromType (TypeDeclaration, options);
+ }
+
protected string GeneratePropertyMembersType (MemberAttributes memberAttributes, bool hasGet, bool hasSet, CodeGeneratorOptions options)
{
TypeDeclaration.Name = "Test1";