public void ConvertNullAPIToAPI() { apiSubAccount = null; converter = new SubAccountConverter(apiSubAccount); Assert.IsNull(converter.ToAPISubAccount()); }
public void ConvertNullSDKToAPI() { sdkSubAccount = null; converter = new SubAccountConverter(sdkSubAccount); Assert.IsNull(converter.ToAPISubAccount()); }
public void ConvertAPIToSDK() { apiSubAccount = CreateTypicalAPISubAccount(); converter = new SubAccountConverter(apiSubAccount); SubAccount subAccount = converter.ToSDKSubAccount(); Assert.IsNotNull(subAccount); }
public void ConvertSDKToSDK() { sdkSubAccount = CreateTypicalSDKSubAccount(); converter = new SubAccountConverter(sdkSubAccount); SubAccount subAccount = converter.ToSDKSubAccount(); Assert.IsNotNull(subAccount); Assert.AreEqual(sdkSubAccount, subAccount); }
public void ConvertAPIToAPI() { apiSubAccount = CreateTypicalAPISubAccount(); converter = new SubAccountConverter(apiSubAccount); OneSpanSign.API.SubAccount subAccount = converter.ToAPISubAccount(); Assert.IsNotNull(subAccount); Assert.AreEqual(apiSubAccount, subAccount); }
public void ConvertSDKToAPI() { sdkSubAccount = CreateTypicalSDKSubAccount(); converter = new SubAccountConverter(sdkSubAccount); OneSpanSign.API.SubAccount subAccount = converter.ToAPISubAccount(); Assert.IsNotNull(subAccount); Assert.AreEqual(SUBACCOUNT_LANGUAGE, subAccount.Language, "language was not set correctly"); Assert.AreEqual(SUBACCOUNT_NAME, subAccount.Name, "Name was not set correctly"); Assert.AreEqual(SUBACCOUNT_TIMEZONE_ID, subAccount.TimezoneId, "TimezoneId was not set correctly"); Assert.AreEqual(SUBACCOUNT_PARENT_ACCOUNT_ID, subAccount.ParentAccountId, "ParentAccountId was not set correctly"); }
public void updateSubAccount(SubAccount subAccount, String accountId) { OneSpanSign.API.SubAccount apiSubAccount = new SubAccountConverter(subAccount).ToAPISubAccount(); apiClient.updateSubAccount(apiSubAccount, accountId); }
public Account createSubAccount(SubAccount subAccount) { OneSpanSign.API.SubAccount apiSubAccount = new SubAccountConverter(subAccount).ToAPISubAccount(); OneSpanSign.API.Account account = apiClient.createSubAccount(apiSubAccount); return(new AccountConverter(account).ToSDKAccount()); }