public void PopulateBasisOfCoverTest()
        {
            var document = new UnitTestDocument();

            document.MockBookmarks = new List <string> {
                "aBookMark", "bBookMark", "cBookMark"
            };

            var view   = new UnitTestDocumentView();
            var target = new InsuranceRenewealReportPresenter(document, view);
            var frags  = new List <IPolicyClass>();

            ;
            for (int i = 0; i < 2; i++)
            {
                var newFrag = new PolicyClass {
                    MajorClass = "A", Title = "A" + i, Url = "http//A" + i
                };
                frags.Add(newFrag);
            }

            for (int i = 0; i < 3; i++)
            {
                var newFrag = new PolicyClass {
                    MajorClass = "B", Title = "B" + i, Url = "http//B" + i
                };
                frags.Add(newFrag);
            }
            target.PopulateBasisOfCover(frags, "http://templates.oamps.com.au/Fragments/Class%20of%20Insurance.docx");
        }
        private void PopulateDocument()
        {
            var template = GenerateTempalteObject();

            //change the graphics selected
            //if (Streams == null) return;
            _presenter.PopulateGraphics(template, lblCoverPageTitle.Text, lblLogoTitle.Text);

            if (_loadType == Helpers.Enums.FormLoadType.RibbonClick)
            {
                LogUsage(template, Helpers.Enums.UsageTrackingType.UpdateData);
                _presenter.PopulateData(template);
                return;
            }

            //popualte the basis of cover sections
            _presenter.PopulateBasisOfCover(_selectedDocumentFragments, Settings.Default.FragmentClassOfInsurance);



            var segmentDocuments = new Dictionary <Enums.Segment, string>
            {
                { Enums.Segment.One, String.Empty },
                { Enums.Segment.Two, Settings.Default.FragmentServicePlanSeg2 },
                { Enums.Segment.Three, Settings.Default.FragmentServicePlanSeg3 },
                { Enums.Segment.Four, Settings.Default.FragmentServicePlanSeg4 },
                { Enums.Segment.Five, Settings.Default.FragmentServicePlanSeg5 },
                { Enums.Segment.PersonalLines, String.Empty }
            };

            //remove basis of covers that have been unticked.
            // _presenter.RemoveBasisOfCover(_unslectedDocumentFragements);

            //populate service level segments
            _presenter.PopulateServiceLineAgrement(_selectedSegment, segmentDocuments, dtpPeriodOfInsuranceFrom.Value);

            _presenter.PopulatePurposeOfReport(_selectedSegment, Settings.Default.FragmentRRPurposeReport23,
                                               Settings.Default.FragmentRRPurposeReport45);

            //build remuneration documents
            var remunerationDocuments = new List <DocumentFragment>
            {
                new DocumentFragment
                {
                    Title = Enums.Remuneration.Fee.ToString(),
                    Url   = Settings.Default.FragementFeesRemuneration
                },
                new DocumentFragment
                {
                    Title = Enums.Remuneration.Combined.ToString(),
                    Url   = Settings.Default.FragementFeesCommission
                },
                new DocumentFragment
                {
                    Title = Enums.Remuneration.Commission.ToString(),
                    Url   = String.Empty
                }
            };

            _presenter.PopulateRemuneration(_selectedRemuneration, remunerationDocuments);

            _presenter.PopulateExecutiveSummary(_selectedRemuneration, Settings.Default.FragmentRREexSumFeeCommission,
                                                Settings.Default.FragmentRREexSumFeeCombine);

            _presenter.PopulateImportantNotices(_selectedStatutory, Settings.Default.FragmentStatutory,
                                                Settings.Default.FragmentPrivacy, Settings.Default.FragmentFSG,
                                                Settings.Default.FragmentTermsOfEngagement);
            _presenter.PopulateUFI(_populateUFI, Settings.Default.FragmentUFI);

            _presenter.PopulatePremiumSummary(_selectedDocumentFragments);

            if (rdoClitProfileYes.Checked)
            {
                _presenter.PopulateclientProfile(Settings.Default.FragmentClientProfile);
            }

            //TODO get this when IT is ready
            //if (_populateUFI)
            //_presenter.SendUFIMessage(template);

            //populate the content controls
            //populate data should be called last, as it ensures any inserted fragments get their controls populated.
            _presenter.PopulateData(template);

            _presenter.MoveToStartOfDocument();

            //tracking
            LogUsage(template,
                     _loadType == Helpers.Enums.FormLoadType.RegenerateTemplate
                         ? Helpers.Enums.UsageTrackingType.RegenerateDocument
                         : Helpers.Enums.UsageTrackingType.NewDocument);
        }