示例#1
0
 public void convertSDKToSDK()
 {
     sdkExpiryTimeConfiguration1 = new ExpiryTimeConfiguration();
     sdkExpiryTimeConfiguration2 = new ExpiryTimeConfigurationConverter(sdkExpiryTimeConfiguration1).ToSDKExpiryTimeConfiguration();
     Assert.IsNotNull(sdkExpiryTimeConfiguration2);
     Assert.AreEqual(sdkExpiryTimeConfiguration2, sdkExpiryTimeConfiguration1);
 }
        public ExpiryTimeConfiguration Build()
        {
            ExpiryTimeConfiguration result = new ExpiryTimeConfiguration();

            result.MaximumRemainingDays = maximumRemainingDays;
            result.RemainingDays        = remainingDays;
            return(result);
        }
示例#3
0
        public void convertSDKToAPI()
        {
            sdkExpiryTimeConfiguration1 = new ExpiryTimeConfiguration();
            sdkExpiryTimeConfiguration1.RemainingDays        = 80;
            sdkExpiryTimeConfiguration1.MaximumRemainingDays = 90;
            apiExpiryTimeConfiguration1 = new ExpiryTimeConfigurationConverter(sdkExpiryTimeConfiguration1).ToAPIExpiryTimeConfiguration();

            Assert.IsNotNull(apiExpiryTimeConfiguration1);
            Assert.AreEqual(sdkExpiryTimeConfiguration1.MaximumRemainingDays, apiExpiryTimeConfiguration1.MaximumRemainingDays);
            Assert.AreEqual(sdkExpiryTimeConfiguration1.RemainingDays, apiExpiryTimeConfiguration1.RemainingDays);
        }
示例#4
0
        public void convertAPIToSDK()
        {
            apiExpiryTimeConfiguration1 = new OneSpanSign.API.ExpiryTimeConfiguration();
            apiExpiryTimeConfiguration1.RemainingDays        = 80;
            apiExpiryTimeConfiguration1.MaximumRemainingDays = 90;
            sdkExpiryTimeConfiguration1 = new ExpiryTimeConfigurationConverter(apiExpiryTimeConfiguration1).ToSDKExpiryTimeConfiguration();

            Assert.IsNotNull(sdkExpiryTimeConfiguration1);
            Assert.AreEqual(apiExpiryTimeConfiguration1.MaximumRemainingDays, sdkExpiryTimeConfiguration1.MaximumRemainingDays);
            Assert.AreEqual(apiExpiryTimeConfiguration1.RemainingDays, sdkExpiryTimeConfiguration1.RemainingDays);
        }
        internal OneSpanSign.Sdk.ExpiryTimeConfiguration ToSDKExpiryTimeConfiguration()
        {
            if (apiExpiryTimeConfiguration == null)
            {
                return(sdkExpiryTimeConfiguration);
            }
            sdkExpiryTimeConfiguration = new ExpiryTimeConfiguration();
            sdkExpiryTimeConfiguration.MaximumRemainingDays = apiExpiryTimeConfiguration.MaximumRemainingDays;
            sdkExpiryTimeConfiguration.RemainingDays        = apiExpiryTimeConfiguration.RemainingDays;

            return(sdkExpiryTimeConfiguration);
        }
示例#6
0
 public void convertNullSDKToSDK()
 {
     sdkExpiryTimeConfiguration1 = null;
     converter = new ExpiryTimeConfigurationConverter(sdkExpiryTimeConfiguration1);
     Assert.IsNull(converter.ToSDKExpiryTimeConfiguration());
 }
 public ExpiryTimeConfigurationConverter(ExpiryTimeConfiguration sdkExpiryTimeConfiguration)
 {
     this.sdkExpiryTimeConfiguration = sdkExpiryTimeConfiguration;
 }