2 // PropertyInfoTest.cs - NUnit Test Cases for PropertyInfo
5 // Gert Driesen (drieseng@users.sourceforge.net)
11 using System.Reflection;
13 using NUnit.Framework;
15 namespace MonoTests.System.Reflection
18 public class PropertyInfoTest : Assertion
21 public void GetAccessorsTest()
23 Type type = typeof(TestClass);
24 PropertyInfo property = type.GetProperty ("ReadOnlyProperty");
25 MethodInfo[] methods = property.GetAccessors (true);
27 AssertEquals ("GetAccessors#1", 1, methods.Length);
28 AssertNotNull ("GetAccessors#2", methods[0]);
33 private class TestClass
35 public string ReadOnlyProperty
37 get { return string.Empty; }