Welcome to mirror list, hosted at ThFree Co, Russian Federation.

KeyEventArgsTest.cs « System.Windows.Forms « Test « Managed.Windows.Forms « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5e77f3d9a9c791624c9b59d03cfa2d498dd8a737 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
//
// Author:
//   Rolf Bjarne Kvinge  (RKvinge@novell.com)
//
// (C) 2007 Novell, Inc. (http://www.novell.com)
//

using System;
using System.Windows.Forms;
using System.Drawing;
using System.Reflection;
using System.ComponentModel;
using NUnit.Framework;
using System.Threading;

namespace MonoTests.System.Windows.Forms
{

	[TestFixture]
	public class KeyEventArgsTest : TestHelper
	{
		[Test]
		public void SuppressKeyPressTest ()
		{
			KeyEventArgs kea = new KeyEventArgs (Keys.L);
			
			Assert.IsFalse (kea.SuppressKeyPress, "#01");
			Assert.IsFalse (kea.Handled, "#02");
			
			kea.SuppressKeyPress = true;
			
			Assert.IsTrue (kea.SuppressKeyPress, "#03");
			Assert.IsTrue (kea.Handled, "#04");
			
			kea.SuppressKeyPress = false;
			
			Assert.IsFalse (kea.SuppressKeyPress, "#05");
			Assert.IsFalse (kea.Handled, "#06");
			
		}
	}
}