Пример #1
0
        public void ProtectedProperties_SetBottomMargin_RespectsSetMargins(float x, float y, float width, float height, int margin)
        {
            var testObj = new TestLayout();
            var container = CreateContainer();
            container.SetCoordinates(x, y, width, height);

            testObj.SetMargin(bottom: margin);
            testObj.LayoutContainer(container);

            testObj.TestProperties(x, y, width, height - margin);
        }
Пример #2
0
        public void ProtectedProperties_SetAllMargins_RespectsSetMargins(float x, float y, float width, float height, int margin)
        {
            var testObj = new TestLayout();
            var container = CreateContainer();
            container.SetCoordinates(x, y, width, height);

            testObj.SetMargin(margin, margin, margin, margin);
            testObj.LayoutContainer(container);

            testObj.TestProperties(x + margin, y + margin, width - 2*margin, height - 2*margin);
        }