Пример #1
0
        private void DefaultProperties(TestTableStyle ts)
        {
            Assert.AreEqual(0, ts.StateBag.Count, "ViewState.Count");

            Assert.AreEqual(String.Empty, ts.BackImageUrl, "BackImageUrl");
            Assert.AreEqual(-1, ts.CellPadding, "CellPadding");
            Assert.AreEqual(-1, ts.CellSpacing, "CellSpacing");
            // LAMESPEC: default is document to be GridLines.Both
            Assert.AreEqual(GridLines.None, ts.GridLines, "GridLines");
            Assert.AreEqual(HorizontalAlign.NotSet, ts.HorizontalAlign, "HorizontalAlign");

            Assert.AreEqual(0, ts.StateBag.Count, "ViewState.Count-2");
            ts.Reset();
            Assert.AreEqual(0, ts.StateBag.Count, "Reset");
        }
Пример #2
0
        private void NullProperties(TestTableStyle ts)
        {
            Assert.IsTrue(ts.Empty, "Empty");
            ts.BackImageUrl = String.Empty;             // doesn't accept null, see specific test
            Assert.AreEqual(String.Empty, ts.BackImageUrl, "BackImageUrl");
            Assert.IsFalse(ts.Empty, "!Empty");

            ts.CellPadding = -1;
            Assert.AreEqual(-1, ts.CellPadding, "CellPadding");
            ts.CellSpacing = -1;
            Assert.AreEqual(-1, ts.CellSpacing, "CellSpacing");
            ts.GridLines = GridLines.None;
            Assert.AreEqual(GridLines.None, ts.GridLines, "GridLines");
            ts.HorizontalAlign = HorizontalAlign.NotSet;
            Assert.AreEqual(HorizontalAlign.NotSet, ts.HorizontalAlign, "HorizontalAlign");

            Assert.AreEqual(5, ts.StateBag.Count, "ViewState.Count-1");
            ts.Reset();
            Assert.AreEqual(0, ts.StateBag.Count, "Reset");
            Assert.IsTrue(ts.Empty, "Empty/Reset");
        }
Пример #3
0
		private void NullProperties (TestTableStyle ts)
		{
			Assert.IsTrue (ts.Empty, "Empty");
			ts.BackImageUrl = String.Empty; // doesn't accept null, see specific test
			Assert.AreEqual (String.Empty, ts.BackImageUrl, "BackImageUrl");
			Assert.IsFalse (ts.Empty, "!Empty");

			ts.CellPadding = -1;
			Assert.AreEqual (-1, ts.CellPadding, "CellPadding");
			ts.CellSpacing = -1;
			Assert.AreEqual (-1, ts.CellSpacing, "CellSpacing");
			ts.GridLines = GridLines.None;
			Assert.AreEqual (GridLines.None, ts.GridLines, "GridLines");
			ts.HorizontalAlign = HorizontalAlign.NotSet;
			Assert.AreEqual (HorizontalAlign.NotSet, ts.HorizontalAlign, "HorizontalAlign");

			Assert.AreEqual (5, ts.StateBag.Count, "ViewState.Count-1");
			ts.Reset ();
			Assert.AreEqual (0, ts.StateBag.Count, "Reset");
			Assert.IsTrue (ts.Empty, "Empty/Reset");
		}
Пример #4
0
		private void DefaultProperties (TestTableStyle ts)
		{
			Assert.AreEqual (0, ts.StateBag.Count, "ViewState.Count");

			Assert.AreEqual (String.Empty, ts.BackImageUrl, "BackImageUrl");
			Assert.AreEqual (-1, ts.CellPadding, "CellPadding");
			Assert.AreEqual (-1, ts.CellSpacing, "CellSpacing");
			// LAMESPEC: default is document to be GridLines.Both
			Assert.AreEqual (GridLines.None, ts.GridLines, "GridLines");
			Assert.AreEqual (HorizontalAlign.NotSet, ts.HorizontalAlign, "HorizontalAlign");

			Assert.AreEqual (0, ts.StateBag.Count, "ViewState.Count-2");
			ts.Reset ();
			Assert.AreEqual (0, ts.StateBag.Count, "Reset");
		}