コード例 #1
0
        public void convertAPIToAPI()
        {
            apiExpiryTimeConfiguration1 = new OneSpanSign.API.ExpiryTimeConfiguration();
            apiExpiryTimeConfiguration2 = new ExpiryTimeConfigurationConverter(apiExpiryTimeConfiguration1).ToAPIExpiryTimeConfiguration();

            Assert.IsNotNull(apiExpiryTimeConfiguration2);
            Assert.AreEqual(apiExpiryTimeConfiguration2, apiExpiryTimeConfiguration1);
        }
コード例 #2
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);
        }
コード例 #3
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);
        }
コード例 #4
0
        internal OneSpanSign.API.ExpiryTimeConfiguration ToAPIExpiryTimeConfiguration()
        {
            if (sdkExpiryTimeConfiguration == null)
            {
                return(apiExpiryTimeConfiguration);
            }
            apiExpiryTimeConfiguration = new OneSpanSign.API.ExpiryTimeConfiguration();
            apiExpiryTimeConfiguration.MaximumRemainingDays = sdkExpiryTimeConfiguration.MaximumRemainingDays;
            apiExpiryTimeConfiguration.RemainingDays        = sdkExpiryTimeConfiguration.RemainingDays;

            return(apiExpiryTimeConfiguration);
        }
コード例 #5
0
 public void convertNullAPIToAPI()
 {
     apiExpiryTimeConfiguration1 = null;
     converter = new ExpiryTimeConfigurationConverter(apiExpiryTimeConfiguration1);
     Assert.IsNull(converter.ToAPIExpiryTimeConfiguration());
 }
コード例 #6
0
 public ExpiryTimeConfigurationConverter(OneSpanSign.API.ExpiryTimeConfiguration apiExpiryTimeConfiguration)
 {
     this.apiExpiryTimeConfiguration = apiExpiryTimeConfiguration;
 }