public void convertAPIToAPI() { apiExpiryTimeConfiguration1 = new OneSpanSign.API.ExpiryTimeConfiguration(); apiExpiryTimeConfiguration2 = new ExpiryTimeConfigurationConverter(apiExpiryTimeConfiguration1).ToAPIExpiryTimeConfiguration(); Assert.IsNotNull(apiExpiryTimeConfiguration2); Assert.AreEqual(apiExpiryTimeConfiguration2, apiExpiryTimeConfiguration1); }
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); }
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.API.ExpiryTimeConfiguration ToAPIExpiryTimeConfiguration() { if (sdkExpiryTimeConfiguration == null) { return(apiExpiryTimeConfiguration); } apiExpiryTimeConfiguration = new OneSpanSign.API.ExpiryTimeConfiguration(); apiExpiryTimeConfiguration.MaximumRemainingDays = sdkExpiryTimeConfiguration.MaximumRemainingDays; apiExpiryTimeConfiguration.RemainingDays = sdkExpiryTimeConfiguration.RemainingDays; return(apiExpiryTimeConfiguration); }
public void convertNullAPIToAPI() { apiExpiryTimeConfiguration1 = null; converter = new ExpiryTimeConfigurationConverter(apiExpiryTimeConfiguration1); Assert.IsNull(converter.ToAPIExpiryTimeConfiguration()); }
public ExpiryTimeConfigurationConverter(OneSpanSign.API.ExpiryTimeConfiguration apiExpiryTimeConfiguration) { this.apiExpiryTimeConfiguration = apiExpiryTimeConfiguration; }