2008-04-16 Marek Habersack <mhabersack@novell.com>
[mono.git] / mcs / class / System / Test / System.ComponentModel / MaskedTextProviderTest.cs
index 90a1c51422a400ba1c1b9e2aa916a19b769fe92e..b59e5efdcc4b5acc76232dc3e43e003a986b0b18 100644 (file)
@@ -2006,6 +2006,19 @@ namespace MonoTests.System.ComponentModel
 
                }
                [Test]
+               public void IsPasswordTest () 
+               {
+                       MaskedTextProvider mtp = new MaskedTextProvider ("a");
+                       Assert.IsFalse (mtp.IsPassword, "#01");
+                       Assert.AreEqual (char.MinValue, mtp.PasswordChar, "#02");
+                       mtp.IsPassword = true;
+                       Assert.IsTrue (mtp.IsPassword, "#03");
+                       Assert.AreEqual ('*', mtp.PasswordChar, "#04");
+                       mtp.IsPassword = false;
+                       Assert.IsFalse (mtp.IsPassword, "#05");
+                       Assert.AreEqual (char.MinValue, mtp.PasswordChar, "#06");
+               }
+               [Test]
                [ExpectedException (typeof (ArgumentNullException))]
                public void Replace_string_int_int_MaskedTextResultHintTestException ()
                {
@@ -5514,4 +5527,4 @@ namespace MonoTests.System.ComponentModel
                /* END */
        }
 }
-#endif
\ No newline at end of file
+#endif