示例#1
0
 private void assertLayoutSettings(CeremonyLayoutSettings actualLayoutSettings, CeremonyLayoutSettings expectedLayoutSettings)
 {
     Assert.AreEqual(expectedLayoutSettings.BreadCrumbs, actualLayoutSettings.BreadCrumbs);
     Assert.AreEqual(expectedLayoutSettings.GlobalNavigation, actualLayoutSettings.GlobalNavigation);
     Assert.AreEqual(expectedLayoutSettings.LogoImageLink, actualLayoutSettings.LogoImageLink);
     Assert.AreEqual(expectedLayoutSettings.LogoImageSource, actualLayoutSettings.LogoImageSource);
     Assert.AreEqual(expectedLayoutSettings.Navigator, actualLayoutSettings.Navigator);
     Assert.AreEqual(expectedLayoutSettings.ProgressBar, actualLayoutSettings.ProgressBar);
     Assert.AreEqual(expectedLayoutSettings.SessionBar, actualLayoutSettings.SessionBar);
     Assert.AreEqual(expectedLayoutSettings.ShowGlobalConfirmButton, actualLayoutSettings.ShowGlobalConfirmButton);
     Assert.AreEqual(expectedLayoutSettings.ShowGlobalDownloadButton, actualLayoutSettings.ShowGlobalDownloadButton);
     Assert.AreEqual(expectedLayoutSettings.ShowGlobalSaveAsLayoutButton, actualLayoutSettings.ShowGlobalSaveAsLayoutButton);
     Assert.AreEqual(expectedLayoutSettings.ShowTitle, actualLayoutSettings.ShowTitle);
 }
        override public void Execute()
        {
            sentLayoutSettings = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                 .WithBreadCrumbs()
                                 .WithGlobalConfirmButton()
                                 .WithGlobalDownloadButton()
                                 .WithGlobalNavigation()
                                 .WithGlobalSaveAsLayoutButton()
                                 .WithIFrame()
                                 .WithLogoImageLink("old logo image link")
                                 .WithLogoImageSource("old logo image source")
                                 .WithNavigator()
                                 .WithProgressBar()
                                 .WithSessionBar()
                                 .WithTitle()
                                 .Build();

            sentSettings = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                           .WithCaptureText()
                           .WithDecline()
                           .WithDialogOnComplete()
                           .WithDocumentToolbarDownloadButton()
                           .WithHandOverLinkHref("http://www.old.ca")
                           .WithHandOverLinkText("old hand over link text")
                           .WithHandOverLinkTooltip("old hand over link tool tip")
                           .WithInPerson()
                           .WithOptOut()
                           .WithOptOutReason("old opt out reason #1")
                           .WithOptOutReason("old opt out reason #2")
                           .WithOptOutReason("old opt out reason #3")
                           .WithWatermark()
                           .WithCeremonyLayoutSettings(sentLayoutSettings)
                           .Build();

            sentPackage = PackageBuilder.NewPackageNamed("Old Package Name")
                          .DescribedAs("Old Description")
                          .WithEmailMessage("Old Email Message")
                          .ExpiresOn(DateTime.Now.AddMonths(1))
                          .WithLanguage(CultureInfo.GetCultureInfo("en"))
                          .WithAutomaticCompletion()
                          .WithSettings(sentSettings)
                          .Build();

            packageId = eslClient.CreatePackage(sentPackage);

            updatedLayoutSettings = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                    .WithoutBreadCrumbs()
                                    .WithoutGlobalConfirmButton()
                                    .WithoutGlobalDownloadButton()
                                    .WithoutGlobalNavigation()
                                    .WithoutGlobalSaveAsLayoutButton()
                                    .WithoutIFrame()
                                    .WithLogoImageLink("new logo image link")
                                    .WithLogoImageSource("new logo image source")
                                    .WithoutNavigator()
                                    .WithoutProgressBar()
                                    .WithoutSessionBar()
                                    .WithoutTitle()
                                    .Build();

            updatedSettings = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                              .WithoutCaptureText()
                              .WithoutDecline()
                              .WithoutDialogOnComplete()
                              .WithoutDocumentToolbarDownloadButton()
                              .WithHandOverLinkHref("http://www.new.ca")
                              .WithHandOverLinkText("new hand over link text")
                              .WithHandOverLinkTooltip("new hand over link tool tip")
                              .WithoutInPerson()
                              .WithoutOptOut()
                              .WithOptOutReason("new opt out reason #1")
                              .WithOptOutReason("new opt out reason #2")
                              .WithOptOutReason("new opt out reason #3")
                              .WithoutWatermark()
                              .WithCeremonyLayoutSettings(updatedLayoutSettings)
                              .Build();

            updatedPackage = PackageBuilder.NewPackageNamed("New Package Name")
                             .WithEmailMessage("New Email Message")
                             .ExpiresOn(DateTime.Now.AddMonths(2))
                             .WithLanguage(CultureInfo.GetCultureInfo("fr"))
                             .WithoutAutomaticCompletion()
                             .WithSettings(updatedSettings)
                             .Build();

            eslClient.UpdatePackage(packageId, updatedPackage);

            retrievedPackage        = eslClient.GetPackage(packageId);
            retrievedSettings       = retrievedPackage.Settings;
            retrievedLayoutSettings = retrievedSettings.CeremonyLayoutSettings;
        }
示例#3
0
        override public void Execute()
        {
            layoutSettingsToCreate = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                     .WithBreadCrumbs()
                                     .WithGlobalConfirmButton()
                                     .WithGlobalDownloadButton()
                                     .WithGlobalNavigation()
                                     .WithGlobalSaveAsLayoutButton()
                                     .WithLogoImageLink(OLD_LOGO_IMAGE_LINK)
                                     .WithLogoImageSource(OLD_LOGO_IMAGE_SOURCE)
                                     .WithNavigator()
                                     .WithProgressBar()
                                     .WithSessionBar()
                                     .WithTitle()
                                     .Build();

            settingsToCreate = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                               .WithCaptureText()
                               .WithDecline()
                               .WithDeclineReason(OLD_DECLINE_REASON_1)
                               .WithDeclineReason(OLD_DECLINE_REASON_2)
                               .WithDeclineReason(OLD_DECLINE_REASON_3)
                               .WithDialogOnComplete()
                               .WithDocumentToolbarDownloadButton()
                               .WithHandOverLinkHref(OLD_HAND_OVER_LINK_HREF)
                               .WithHandOverLinkText(OLD_HAND_OVER_LINK_TEXT)
                               .WithHandOverLinkTooltip(OLD_HAND_OVER_LINK_TOOL_TIP)
                               .WithInPerson()
                               .WithOptOut()
                               .WithOptOutReason(OLD_OPT_OUT_REASON_1)
                               .WithOptOutReason(OLD_OPT_OUT_REASON_2)
                               .WithOptOutReason(OLD_OPT_OUT_REASON_3)
                               .WithWatermark()
                               .WithCeremonyLayoutSettings(layoutSettingsToCreate)
                               .Build();

            packageToCreate = PackageBuilder.NewPackageNamed(OLD_PACKAGE_NAME)
                              .DescribedAs(OLD_DESCRIPTION)
                              .WithEmailMessage(OLD_EMAIL_MESSAGE)
                              .ExpiresOn(OLD_EXPIRY_DATE)
                              .WithLanguage(OLD_LANGUAGE)
                              .WithVisibility(OLD_VISIBILITY)
                              .WithNotarized(OLD_NOTARIZED)
                              .WithAutomaticCompletion()
                              .WithSettings(settingsToCreate)
                              .Build();

            packageId = ossClient.CreatePackage(packageToCreate);

            createdPackage        = ossClient.GetPackage(packageId);
            createdSettings       = createdPackage.Settings;
            createdLayoutSettings = createdSettings.CeremonyLayoutSettings;

            layoutSettingsToUpdate = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                     .WithoutBreadCrumbs()
                                     .WithoutGlobalConfirmButton()
                                     .WithoutGlobalDownloadButton()
                                     .WithoutGlobalNavigation()
                                     .WithoutGlobalSaveAsLayoutButton()
                                     .WithLogoImageLink(NEW_LOGO_IMAGE_LINK)
                                     .WithLogoImageSource(NEW_LOGO_IMAGE_SOURCE)
                                     .WithoutNavigator()
                                     .WithoutProgressBar()
                                     .WithoutSessionBar()
                                     .WithoutTitle()
                                     .Build();

            settingsToUpdate = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                               .WithoutCaptureText()
                               .WithDecline()
                               .WithDeclineReason(NEW_DECLINE_REASON_1)
                               .WithDeclineReason(NEW_DECLINE_REASON_2)
                               .WithDeclineReason(NEW_DECLINE_REASON_3)
                               .WithoutDialogOnComplete()
                               .WithoutDocumentToolbarDownloadButton()
                               .WithHandOverLinkHref(NEW_HAND_OVER_LINK_HREF)
                               .WithHandOverLinkText(NEW_HAND_OVER_LINK_TEXT)
                               .WithHandOverLinkTooltip(NEW_HAND_OVER_LINK_TOOL_TIP)
                               .WithoutInPerson()
                               .WithoutOptOut()
                               .WithOptOutReason(NEW_OPT_OUT_REASON_1)
                               .WithOptOutReason(NEW_OPT_OUT_REASON_2)
                               .WithOptOutReason(NEW_OPT_OUT_REASON_3)
                               .WithoutWatermark()
                               .WithCeremonyLayoutSettings(layoutSettingsToUpdate)
                               .Build();

            packageToUpdate = PackageBuilder.NewPackageNamed(NEW_PACKAGE_NAME)
                              .WithEmailMessage(NEW_EMAIL_MESSAGE)
                              .ExpiresOn(NEW_EXPIRY_DATE)
                              .WithLanguage(NEW_LANGUAGE)
                              .WithVisibility(NEW_VISIBILITY)
                              .WithNotarized(NEW_NOTARIZED)
                              .WithoutAutomaticCompletion()
                              .WithSettings(settingsToUpdate)
                              .Build();

            ossClient.UpdatePackage(packageId, packageToUpdate);

            updatedPackage        = ossClient.GetPackage(packageId);
            updatedSettings       = updatedPackage.Settings;
            updatedLayoutSettings = updatedSettings.CeremonyLayoutSettings;
        }