public void CopyFrom_Empty() { TestTableItemStyle tis = new TestTableItemStyle(); tis.CopyFrom(new TableItemStyle()); DefaultProperties(tis); }
public void MergeWith_Empty() { TestTableItemStyle tis = new TestTableItemStyle(); tis.MergeWith(new TableItemStyle()); DefaultProperties(tis); }
public void Constructor_Default() { TestTableItemStyle tis = new TestTableItemStyle(); DefaultProperties(tis); NullProperties(tis); }
public void Constructor_StateBag() { TestTableItemStyle tis = new TestTableItemStyle(new StateBag()); Assert.IsNotNull(tis.StateBag, "StateBag"); DefaultProperties(tis); NullProperties(tis); }
private void DefaultProperties(TestTableItemStyle tis) { Assert.AreEqual(0, tis.StateBag.Count, "ViewState.Count"); Assert.AreEqual(HorizontalAlign.NotSet, tis.HorizontalAlign, "HorizontalAlign"); Assert.AreEqual(VerticalAlign.NotSet, tis.VerticalAlign, "VerticalAlign"); Assert.IsTrue(tis.Wrap, "Wrap"); Assert.AreEqual(0, tis.StateBag.Count, "ViewState.Count-2"); tis.Reset(); Assert.AreEqual(0, tis.StateBag.Count, "Reset"); }
private void DefaultProperties (TestTableItemStyle tis) { Assert.AreEqual (0, tis.StateBag.Count, "ViewState.Count"); Assert.AreEqual (HorizontalAlign.NotSet, tis.HorizontalAlign, "HorizontalAlign"); Assert.AreEqual (VerticalAlign.NotSet, tis.VerticalAlign, "VerticalAlign"); Assert.IsTrue (tis.Wrap, "Wrap"); Assert.AreEqual (0, tis.StateBag.Count, "ViewState.Count-2"); tis.Reset (); Assert.AreEqual (0, tis.StateBag.Count, "Reset"); }
private void NullProperties(TestTableItemStyle tis) { Assert.IsTrue(tis.Empty, "Empty"); tis.HorizontalAlign = HorizontalAlign.NotSet; Assert.AreEqual(HorizontalAlign.NotSet, tis.HorizontalAlign, "HorizontalAlign"); Assert.IsFalse(tis.Empty, "!Empty"); tis.VerticalAlign = VerticalAlign.NotSet; Assert.AreEqual(VerticalAlign.NotSet, tis.VerticalAlign, "VerticalAlign"); tis.Wrap = true; Assert.IsTrue(tis.Wrap, "Wrap"); Assert.AreEqual(3, tis.StateBag.Count, "ViewState.Count-1"); tis.Reset(); Assert.AreEqual(0, tis.StateBag.Count, "Reset"); Assert.IsTrue(tis.Empty, "Empty/Reset"); }
private void NullProperties (TestTableItemStyle tis) { Assert.IsTrue (tis.Empty, "Empty"); tis.HorizontalAlign = HorizontalAlign.NotSet; Assert.AreEqual (HorizontalAlign.NotSet, tis.HorizontalAlign, "HorizontalAlign"); Assert.IsFalse (tis.Empty, "!Empty"); tis.VerticalAlign = VerticalAlign.NotSet; Assert.AreEqual (VerticalAlign.NotSet, tis.VerticalAlign, "VerticalAlign"); tis.Wrap = true; Assert.IsTrue (tis.Wrap, "Wrap"); Assert.AreEqual (3, tis.StateBag.Count, "ViewState.Count-1"); tis.Reset (); Assert.AreEqual (0, tis.StateBag.Count, "Reset"); Assert.IsTrue (tis.Empty, "Empty/Reset"); }
public void SetBitCalledWhenSetProperty() { TestTableItemStyle s = new TestTableItemStyle(); s.SetBitCalledFlag = false; s.HorizontalAlign = HorizontalAlign.Right; Assert.IsTrue(s.SetBitCalledFlag, "SetBit() was not called : HorizontalAlign"); Assert.AreEqual(0x10000, s.SetBitCalledValue, "SetBit() was called with wrong argument : HorizontalAlign"); s.SetBitCalledFlag = false; s.VerticalAlign = VerticalAlign.Bottom; Assert.IsTrue(s.SetBitCalledFlag, "SetBit() was not called : VerticalAlign"); Assert.AreEqual(0x20000, s.SetBitCalledValue, "SetBit() was called with wrong argument : VerticalAlign"); s.SetBitCalledFlag = false; s.Wrap = false; Assert.IsTrue(s.SetBitCalledFlag, "SetBit() was not called : Wrap"); Assert.AreEqual(0x40000, s.SetBitCalledValue, "SetBit() was called with wrong argument : Wrap"); }
public void SetBitCalledWhenSetProperty () { TestTableItemStyle s = new TestTableItemStyle (); s.SetBitCalledFlag = false; s.HorizontalAlign = HorizontalAlign.Right; Assert.IsTrue (s.SetBitCalledFlag, "SetBit() was not called : HorizontalAlign"); Assert.AreEqual (0x10000, s.SetBitCalledValue, "SetBit() was called with wrong argument : HorizontalAlign"); s.SetBitCalledFlag = false; s.VerticalAlign = VerticalAlign.Bottom; Assert.IsTrue (s.SetBitCalledFlag, "SetBit() was not called : VerticalAlign"); Assert.AreEqual (0x20000, s.SetBitCalledValue, "SetBit() was called with wrong argument : VerticalAlign"); s.SetBitCalledFlag = false; s.Wrap = false; Assert.IsTrue (s.SetBitCalledFlag, "SetBit() was not called : Wrap"); Assert.AreEqual (0x40000, s.SetBitCalledValue, "SetBit() was called with wrong argument : Wrap"); }
public void MergeWith_Empty () { TestTableItemStyle tis = new TestTableItemStyle (); tis.MergeWith (new TableItemStyle ()); DefaultProperties (tis); }
public void CopyFrom_Empty () { TestTableItemStyle tis = new TestTableItemStyle (); tis.CopyFrom (new TableItemStyle ()); DefaultProperties (tis); }
public void Constructor_StateBag () { TestTableItemStyle tis = new TestTableItemStyle (new StateBag ()); Assert.IsNotNull (tis.StateBag, "StateBag"); DefaultProperties (tis); NullProperties (tis); }
public void Constructor_Default () { TestTableItemStyle tis = new TestTableItemStyle (); DefaultProperties (tis); NullProperties (tis); }