[bcl] Remove more NET_2_0 checks from class libs
[mono.git] / mcs / class / Managed.Windows.Forms / Test / System.Windows.Forms / DataGridViewTextBoxColumnTest.cs
1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
8 // 
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
11 // 
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 //
20 // Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
21 //
22 // Author:
23 //      Rolf Bjarne Kvinge  (RKvinge@novell.com)
24 //
25
26
27 using NUnit.Framework;
28 using System;
29 using System.Drawing;
30 using System.Windows.Forms;
31 using System.ComponentModel;
32 using System.Collections;
33
34 namespace MonoTests.System.Windows.Forms
35 {
36
37         [TestFixture]
38         public class DataGridViewTextBoxColumnTest : TestHelper
39         {
40                 [Test]
41                 public void InitialValues ()
42                 {
43                         DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn ();
44
45                         Assert.AreEqual ("DataGridViewTextBoxColumn { Name=, Index=-1 }", col.ToString (), "T3");
46                         Assert.AreEqual ("DataGridViewTextBoxColumn", col.GetType ().Name, "G2");
47
48                         Assert.AreEqual (DataGridViewAutoSizeColumnMode.NotSet, col.AutoSizeMode, "#A col.AutoSizeMode");
49                         Assert.IsNotNull (col.CellTemplate, "#A col.CellTemplate");
50                         Assert.IsNotNull (col.CellType, "#A col.CellType");
51                         Assert.IsNull (col.ContextMenuStrip, "#A col.ContextMenuStrip");
52                         Assert.IsNull (col.DataGridView, "#A col.DataGridView");
53                         Assert.AreEqual (@"", col.DataPropertyName, "#A col.DataPropertyName");
54                         Assert.IsNotNull (col.DefaultCellStyle, "#A col.DefaultCellStyle");
55                         Assert.IsNotNull (col.DefaultHeaderCellType, "#A col.DefaultHeaderCellType");
56                         Assert.AreEqual (false, col.Displayed, "#A col.Displayed");
57                         Assert.AreEqual (-1, col.DisplayIndex, "#A col.DisplayIndex");
58                         Assert.AreEqual (0, col.DividerWidth, "#A col.DividerWidth");
59                         Assert.AreEqual (100, col.FillWeight, "#A col.FillWeight");
60                         Assert.AreEqual (false, col.Frozen, "#A col.Frozen");
61                         Assert.AreEqual (true, col.HasDefaultCellStyle, "#A col.HasDefaultCellStyle");
62                         Assert.IsNotNull (col.HeaderCell, "#A col.HeaderCell");
63                         Assert.AreEqual (@"", col.HeaderText, "#A col.HeaderText");
64                         Assert.AreEqual (-1, col.Index, "#A col.Index");
65                         Assert.AreEqual (DataGridViewAutoSizeColumnMode.NotSet, col.InheritedAutoSizeMode, "#A col.InheritedAutoSizeMode");
66                         Assert.IsNotNull (col.InheritedStyle, "#A col.InheritedStyle");
67                         Assert.AreEqual (false, col.IsDataBound, "#A col.IsDataBound");
68                         Assert.AreEqual (32767, col.MaxInputLength, "#A col.MaxInputLength");
69                         Assert.AreEqual (5, col.MinimumWidth, "#A col.MinimumWidth");
70                         Assert.AreEqual (@"", col.Name, "#A col.Name");
71                         Assert.AreEqual (false, col.ReadOnly, "#A col.ReadOnly");
72                         Assert.AreEqual (DataGridViewTriState.NotSet, col.Resizable, "#A col.Resizable");
73                         Assert.AreEqual (false, col.Selected, "#A col.Selected");
74                         Assert.IsNull (col.Site, "#A col.Site");
75                         Assert.AreEqual (DataGridViewColumnSortMode.Automatic, col.SortMode, "#A col.SortMode");
76                         Assert.AreEqual (DataGridViewElementStates.Visible, col.State, "#A col.State");
77                         Assert.IsNull (col.Tag, "#A col.Tag");
78                         Assert.AreEqual (@"", col.ToolTipText, "#A col.ToolTipText");
79                         Assert.IsNull (col.ValueType, "#A col.ValueType");
80                         Assert.AreEqual (true, col.Visible, "#A col.Visible");
81                         Assert.AreEqual (100, col.Width, "#A col.Width");
82                 }
83         }
84 }