Example #1
0
        public void ConvertNullSDKToSDK()
        {
            sdkCeremonyLayoutSettings1 = null;
            converter = new CeremonyLayoutSettingsConverter(sdkCeremonyLayoutSettings1);

            Assert.IsNull(converter.ToSDKCeremonyLayoutSettings());
        }
Example #2
0
        public void ConvertSDKToSDK()
        {
            sdkCeremonyLayoutSettings1 = CreateTypicalSDKCeremonyLayoutSettings();
            sdkCeremonyLayoutSettings2 = new CeremonyLayoutSettingsConverter(sdkCeremonyLayoutSettings1).ToSDKCeremonyLayoutSettings();

            Assert.IsNotNull(sdkCeremonyLayoutSettings2);
            Assert.AreEqual(sdkCeremonyLayoutSettings2, sdkCeremonyLayoutSettings1);
        }
Example #3
0
        private OneSpanSign.Sdk.CeremonyLayoutSettings CreateTypicalSDKCeremonyLayoutSettings()
        {
            OneSpanSign.Sdk.CeremonyLayoutSettings settings = new OneSpanSign.Sdk.CeremonyLayoutSettings();
            settings.LogoImageLink                = "logoImageLink";
            settings.LogoImageSource              = "logoImageSource";
            settings.IFrame                       = true;
            settings.ShowTitle                    = true;
            settings.SessionBar                   = true;
            settings.ProgressBar                  = true;
            settings.BreadCrumbs                  = true;
            settings.GlobalNavigation             = true;
            settings.ShowGlobalConfirmButton      = true;
            settings.ShowGlobalDownloadButton     = true;
            settings.ShowGlobalSaveAsLayoutButton = true;

            return(settings);
        }
        public CeremonyLayoutSettings Build()
        {
            CeremonyLayoutSettings result = new CeremonyLayoutSettings();

            result.BreadCrumbs                  = breadCrumbs;
            result.SessionBar                   = sessionBar;
            result.GlobalNavigation             = globalNavigation;
            result.ProgressBar                  = progressBar;
            result.ShowTitle                    = showTitle;
            result.Navigator                    = navigator;
            result.ShowGlobalConfirmButton      = showGlobalConfirmButton;
            result.ShowGlobalDownloadButton     = showGlobalDownloadButton;
            result.ShowGlobalSaveAsLayoutButton = showGlobalSaveAsLayoutButton;
            result.LogoImageSource              = logoImageSource;
            result.LogoImageLink                = logoImageLink;

            return(result);
        }
Example #5
0
        public void ConvertSDKToAPI()
        {
            sdkCeremonyLayoutSettings1 = CreateTypicalSDKCeremonyLayoutSettings();
            apiLayoutOptions1          = new CeremonyLayoutSettingsConverter(sdkCeremonyLayoutSettings1).ToAPILayoutOptions();

            Assert.IsNotNull(apiLayoutOptions1);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.LogoImageLink, apiLayoutOptions1.BrandingBar.Logo.Link);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.LogoImageSource, apiLayoutOptions1.BrandingBar.Logo.Src);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.IFrame, apiLayoutOptions1.Iframe);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowTitle, apiLayoutOptions1.Header.TitleBar.Title);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.SessionBar, apiLayoutOptions1.Header.SessionBar);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ProgressBar, apiLayoutOptions1.Header.TitleBar.ProgressBar);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.BreadCrumbs, apiLayoutOptions1.Header.Breadcrumbs);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.GlobalNavigation, apiLayoutOptions1.Header.GlobalNavigation);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalConfirmButton, apiLayoutOptions1.Header.GlobalActions.Confirm);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalDownloadButton, apiLayoutOptions1.Header.GlobalActions.Download);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalSaveAsLayoutButton, apiLayoutOptions1.Header.GlobalActions.SaveAsLayout);
        }
Example #6
0
        public OneSpanSign.Sdk.CeremonyLayoutSettings ToSDKCeremonyLayoutSettings()
        {
            if (apiLayoutOptions == null)
            {
                return(sdkCeremonyLayoutSettings);
            }

            CeremonyLayoutSettings result = new CeremonyLayoutSettings();

            result.IFrame = apiLayoutOptions.Iframe;

            if (apiLayoutOptions.Header != null)
            {
                result.BreadCrumbs      = apiLayoutOptions.Header.Breadcrumbs;
                result.SessionBar       = apiLayoutOptions.Header.SessionBar;
                result.GlobalNavigation = apiLayoutOptions.Header.GlobalNavigation;

                if (apiLayoutOptions.Header.GlobalActions != null)
                {
                    result.ShowGlobalConfirmButton      = apiLayoutOptions.Header.GlobalActions.Confirm;
                    result.ShowGlobalDownloadButton     = apiLayoutOptions.Header.GlobalActions.Download;
                    result.ShowGlobalSaveAsLayoutButton = apiLayoutOptions.Header.GlobalActions.SaveAsLayout;
                }

                if (apiLayoutOptions.Header.TitleBar != null)
                {
                    result.ShowTitle   = apiLayoutOptions.Header.TitleBar.Title;
                    result.ProgressBar = apiLayoutOptions.Header.TitleBar.ProgressBar;
                }
            }

            result.Navigator = apiLayoutOptions.Navigator;

            if (apiLayoutOptions.BrandingBar != null && apiLayoutOptions.BrandingBar.Logo != null)
            {
                result.LogoImageLink   = apiLayoutOptions.BrandingBar.Logo.Link;
                result.LogoImageSource = apiLayoutOptions.BrandingBar.Logo.Src;
            }

            return(result);
        }
 public DocumentPackageSettingsBuilder WithCeremonyLayoutSettings(CeremonyLayoutSettings ceremonyLayoutSettings)
 {
     this.ceremonyLayoutSettings = ceremonyLayoutSettings;
     return(this);
 }