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

CheckBoxTest.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: 2fd428da8fbbbcb9ff05a540da909ecb837c9e8a (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
//
// Copyright (c) 2005 Novell, Inc.
//
// Authors:
//		Ritvik Mayank (mritvik@novell.com)
//

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

namespace MonoTests.System.Windows.Forms
{
	[TestFixture]
	public class CheckBoxTest
	{
		[Test]
		public void CheckBoxPropertyTest () 
		{
			Form myform = new Form ();
			CheckBox mychkbox = new CheckBox(); 
			myform.Controls.Add (mychkbox);
			Assert.AreEqual (Appearance.Normal, mychkbox.Appearance, "#1");
			mychkbox.Appearance = Appearance.Button;
			Assert.AreEqual (Appearance.Button, mychkbox.Appearance, "#2");
			Assert.AreEqual (true, mychkbox.AutoCheck, "#3");
			mychkbox.AutoCheck = false;
			Assert.AreEqual (false, mychkbox.AutoCheck, "#4");
			Assert.AreEqual (false, mychkbox.Checked, "#5");
			Assert.AreEqual (CheckState.Unchecked, mychkbox.CheckState, "#6");
			Assert.AreEqual (ContentAlignment.MiddleLeft, mychkbox.CheckAlign, "#7");
			Assert.AreEqual (ContentAlignment.MiddleLeft, mychkbox.TextAlign, "#8");
			Assert.AreEqual (false, mychkbox.ThreeState, "#9");
		}
	}
}