2009-06-06 Carlos Alberto Cortez <calberto.cortez@gmail.com>
[mono.git] / mcs / class / Managed.Windows.Forms / Test / System.Windows.Forms / KeyEventArgsTest.cs
1 //
2 //
3 // Author:
4 //   Rolf Bjarne Kvinge  (RKvinge@novell.com)
5 //
6 // (C) 2007 Novell, Inc. (http://www.novell.com)
7 //
8
9 using System;
10 using System.Windows.Forms;
11 using System.Drawing;
12 using System.Reflection;
13 using System.ComponentModel;
14 using NUnit.Framework;
15 using System.Threading;
16
17 namespace MonoTests.System.Windows.Forms
18 {
19
20         [TestFixture]
21         public class KeyEventArgsTest : TestHelper
22         {
23 #if NET_2_0
24                 [Test]
25                 public void SuppressKeyPressTest ()
26                 {
27                         KeyEventArgs kea = new KeyEventArgs (Keys.L);
28                         
29                         Assert.IsFalse (kea.SuppressKeyPress, "#01");
30                         Assert.IsFalse (kea.Handled, "#02");
31                         
32                         kea.SuppressKeyPress = true;
33                         
34                         Assert.IsTrue (kea.SuppressKeyPress, "#03");
35                         Assert.IsTrue (kea.Handled, "#04");
36                         
37                         kea.SuppressKeyPress = false;
38                         
39                         Assert.IsFalse (kea.SuppressKeyPress, "#05");
40                         Assert.IsFalse (kea.Handled, "#06");
41                         
42                 }
43 #endif
44         }
45 }