Пример #1
0
        public void DetailEnds()
        {
            SectionBounds sectionBounds = new SectionBounds(new ReportSettings(), true);
            BaseSection   baseSection   = new BaseSection();

            baseSection.Location = new Point(50, 50);
            baseSection.Size     = new Size(727, 60);
            sectionBounds.MeasurePageFooter(baseSection);
            Point p = new Point(sectionBounds.PageFooterRectangle.Left, sectionBounds.PageFooterRectangle.Top - sectionBounds.Gap);

            Assert.AreEqual(p, sectionBounds.DetailEnds);
        }
Пример #2
0
        public void MeasureReportFooterPageFooterIsCalculated()
        {
            SectionBounds sectionBounds = new SectionBounds(new ReportSettings(), true);
            BaseSection   baseSection   = new BaseSection();

            baseSection.Location = new Point(50, 50);
            baseSection.Size     = new Size(727, 60);
            sectionBounds.MeasurePageFooter(baseSection);
            sectionBounds.MeasureReportFooter(baseSection);

            Assert.AreEqual(baseSection.Size.Height, sectionBounds.ReportFooterRectangle.Size.Height,
                            "ItemsCollection is empty, so Size.Height should be '0'");
            Assert.AreEqual(sectionBounds.MarginBounds.Width,
                            sectionBounds.ReportFooterRectangle.Width);
        }
Пример #3
0
        public void MeasurePageFooter()
        {
            var           setting       = new ReportSettings();
            SectionBounds sectionBounds = new SectionBounds(new ReportSettings(), true);
            BaseSection   baseSection   = new BaseSection();

            baseSection.Location = new Point(50, 50);
            baseSection.Size     = new Size(727, 60);
            sectionBounds.MeasurePageFooter(baseSection);
            Assert.AreEqual(baseSection.Size.Height,
                            sectionBounds.PageFooterRectangle.Size.Height);


            Assert.AreEqual(sectionBounds.MarginBounds.Width,
                            sectionBounds.PageFooterRectangle.Width);
            //int i = sectionBounds.PageSize.Height - setting.BottomMargin;
            //Assert.AreEqual(i,sectionBounds.PageFooterRectangle.Location.Y);
        }