Beispiel #1
0
        public virtual void SetMaxHeightUnitValueTest()
        {
            float expectedMaxHeight = 50;
            Style style             = new Style();

            NUnit.Framework.Assert.IsNull(style.GetProperty <UnitValue>(Property.MAX_HEIGHT));
            style.SetMaxHeight(UnitValue.CreatePointValue(expectedMaxHeight));
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMaxHeight), style.GetProperty <UnitValue
                                                                                                              >(Property.MAX_HEIGHT));
        }
Beispiel #2
0
        public virtual void SetMaxHeightViaStyleTest()
        {
            float expectedMaxHeight = 80;
            Style style             = new Style();

            style.SetMaxHeight(UnitValue.CreatePointValue(expectedMaxHeight));
            Paragraph p = new Paragraph();

            p.AddStyle(style);
            NUnit.Framework.Assert.AreEqual(UnitValue.CreatePointValue(expectedMaxHeight), p.GetProperty <UnitValue>(Property
                                                                                                                     .MAX_HEIGHT));
        }