Exemple #1
0
        public static VirtualAccount VirtualAccountCloseTest()
        {
            VirtualAccount va = VirtualAccountCreateTest();

            VirtualAccount va1 = new VirtualAccount((string)va["id"]);

            return(va1.Close());
        }
Exemple #2
0
        public void TestCloseVirtualAccount()
        {
            string         filepath           = "dummy_virtual_account.json";
            string         url                = string.Format("{0}/{1}", virtualAccountURL, VIRTUALACCOUNTID);
            Client         client             = new Client(ACCESSID, SECRETKEY, Helper.GetMockRequestFactory(filepath, url));
            VirtualAccount virtualAccount     = client.VirtualAccount.Retrieve(VIRTUALACCOUNTID);
            string         expectedJsonString = Helper.GetJsonString(filepath);

            Helper.AssertEntity(virtualAccount, expectedJsonString);

            string filepath2 = "dummy_virtual_account.json";

            client             = new Client(ACCESSID, SECRETKEY, Helper.GetMockRequestFactory(filepath2, url));
            virtualAccount     = virtualAccount.Close();
            expectedJsonString = Helper.GetJsonString(filepath2);
            Helper.AssertEntity(virtualAccount, expectedJsonString);
        }