TestTableHeaderCell th = new TestTableHeaderCell ();
Assert.AreEqual (0, th.Attributes.Count, "Attributes.Count");
Assert.AreEqual (0, th.StateBag.Count, "ViewState.Count");
-#if NET_2_0
Assert.AreEqual (String.Empty, th.AbbreviatedText, "AbbreviatedText");
Assert.AreEqual (0, th.CategoryText.Length, "CategoryText");
Assert.AreEqual (TableHeaderScope.NotSet, th.Scope, "Scope");
-#endif
Assert.AreEqual ("th", th.Tag, "TagName");
Assert.AreEqual (0, th.Attributes.Count, "Attributes.Count-2");
Assert.AreEqual (0, th.StateBag.Count, "ViewState.Count-2");
public void NullProperties ()
{
TestTableHeaderCell th = new TestTableHeaderCell ();
-#if NET_2_0
th.AbbreviatedText = null;
Assert.AreEqual (String.Empty, th.AbbreviatedText, "AbbreviatedText");
th.Scope = TableHeaderScope.NotSet;
Assert.AreEqual (TableHeaderScope.NotSet, th.Scope, "Scope");
Assert.AreEqual (2, th.StateBag.Count, "ViewState.Count-2");
-#else
- Assert.AreEqual (0, th.StateBag.Count, "ViewState.Count-1");
-#endif
Assert.AreEqual (0, th.Attributes.Count, "Attributes.Count");
}
public void CleanProperties ()
{
TestTableHeaderCell th = new TestTableHeaderCell ();
-#if NET_2_0
th.AbbreviatedText = "header";
Assert.AreEqual ("header", th.AbbreviatedText, "AbbreviatedText");
th.AbbreviatedText = null;
th.Scope = TableHeaderScope.NotSet;
Assert.AreEqual (TableHeaderScope.NotSet, th.Scope, "-Scope");
Assert.AreEqual (2, th.StateBag.Count, "ViewState.Count-2");
-#else
- Assert.AreEqual (0, th.StateBag.Count, "ViewState.Count-1");
-#endif
Assert.AreEqual (0, th.Attributes.Count, "Attributes.Count");
}
TestTableHeaderCell th = new TestTableHeaderCell ();
string s = th.Render ();
Assert.AreEqual (AdjustLineEndings ("<th></th>"), s, "empty/default");
-#if NET_2_0
th.AbbreviatedText = "header";
s = th.Render ();
Assert.AreEqual (AdjustLineEndings ("<th abbr=\"header\"></th>"), s, "AbbreviatedText");
th.Scope = TableHeaderScope.NotSet;
s = th.Render ();
Assert.AreEqual (AdjustLineEndings ("<th></th>"), s, "NotSet");
-#endif
th.Text = "test";
s = th.Render ();
Assert.AreEqual (AdjustLineEndings ("<th>test</th>"), s, "Text");