Example #1
0
        public virtual void GetMarginLeftTest()
        {
            float expLeftMargin = 88;
            Style style         = new Style();

            NUnit.Framework.Assert.IsNull(style.GetMarginLeft());
            style.SetMarginLeft(expLeftMargin);
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expLeftMargin), style.GetMarginLeft());
        }
Example #2
0
        public virtual void SetMarginTest()
        {
            float expectedMargin = 90;
            Style style          = new Style();

            NUnit.Framework.Assert.IsNull(style.GetMarginTop());
            NUnit.Framework.Assert.IsNull(style.GetMarginRight());
            NUnit.Framework.Assert.IsNull(style.GetMarginBottom());
            NUnit.Framework.Assert.IsNull(style.GetMarginLeft());
            style.SetMargin(expectedMargin);
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMargin), style.GetMarginTop());
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMargin), style.GetMarginRight());
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMargin), style.GetMarginBottom());
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMargin), style.GetMarginLeft());
        }
Example #3
0
        public virtual void SetAndGetMarginsTest()
        {
            float expectedMarginTop    = 92;
            float expectedMarginRight  = 90;
            float expectedMarginBottom = 86;
            float expectedMarginLeft   = 88;
            Style style = new Style();

            NUnit.Framework.Assert.IsNull(style.GetMarginTop());
            NUnit.Framework.Assert.IsNull(style.GetMarginRight());
            NUnit.Framework.Assert.IsNull(style.GetMarginBottom());
            NUnit.Framework.Assert.IsNull(style.GetMarginLeft());
            style.SetMargins(expectedMarginTop, expectedMarginRight, expectedMarginBottom, expectedMarginLeft);
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMarginTop), style.GetMarginTop());
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMarginRight), style.GetMarginRight());
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMarginBottom), style.GetMarginBottom());
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMarginLeft), style.GetMarginLeft());
        }