Exemplo n.º 1
0
        public void ConvertNullAPIToAPI()
        {
            apiSubAccount = null;
            converter     = new SubAccountConverter(apiSubAccount);

            Assert.IsNull(converter.ToAPISubAccount());
        }
Exemplo n.º 2
0
        public void ConvertNullSDKToAPI()
        {
            sdkSubAccount = null;
            converter     = new SubAccountConverter(sdkSubAccount);

            Assert.IsNull(converter.ToAPISubAccount());
        }
Exemplo n.º 3
0
        public void ConvertAPIToAPI()
        {
            apiSubAccount = CreateTypicalAPISubAccount();
            converter     = new SubAccountConverter(apiSubAccount);

            OneSpanSign.API.SubAccount subAccount = converter.ToAPISubAccount();

            Assert.IsNotNull(subAccount);
            Assert.AreEqual(apiSubAccount, subAccount);
        }
Exemplo n.º 4
0
        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");
        }