Add [Category ("NotWorking")] to failing test.
[mono.git] / mcs / class / corlib / Test / System.Reflection / PropertyInfoTest.cs
index 3bee7e8c55fadcca660a076085fd52fe1f53bab7..67da2d7b5c864238748b83fe2fad23328acbc57e 100644 (file)
@@ -528,5 +528,23 @@ namespace MonoTests.System.Reflection
                                Assert.IsTrue (ex.InnerException is ObjectDisposedException);
                        }
                }
+
+               public class DefaultValueTest
+               {
+                       public string this[int val, string param = "test"]
+                       {
+                               get{ return val + param; }
+                       }
+               }
+
+
+               [Test]
+               public void PropertyWithDefaultValue ()
+               {
+                       var parameters = typeof (DefaultValueTest).GetProperty ("Item").GetIndexParameters ();
+                       var defaultParam = parameters[parameters.Length - 1];
+                       Assert.AreEqual ("param", defaultParam.Name, "#1");
+                       Assert.AreEqual ("test", defaultParam.DefaultValue, "#2");
+               }
        }
 }