public void GetPayPalAccountSuccessfully()
        {
            var repo = new PayPalAccountRepository();
            var userId = "ec9bf096-c505-4bef-87f6-18822b9dbf2c"; //some user created before
            var account = new PayPalAccount
            {
                UserId = userId,
                Active = true,
                PayPal = new PayPal
                {
                    Email = "*****@*****.**"
                }
            };
            var createdAccount = repo.CreatePayPalAccount(account);

            var gotAccount = repo.GetPayPalAccountById(createdAccount.Id);

            Assert.AreEqual(createdAccount.Id, gotAccount.Id);
        }
 public void CreatePayPalAccountSuccessfully()
 {
     var repo = new PayPalAccountRepository();
     var userId = "ec9bf096-c505-4bef-87f6-18822b9dbf2c"; //some user created before
     var account = new PayPalAccount
     {
         UserId = userId,
         Active = true,
         PayPal = new PayPal
         {
             Email = "*****@*****.**"
         }
     };
     var createdAccount = repo.CreatePayPalAccount(account);
     Assert.IsNotNull(createdAccount);
     Assert.IsNotNull(createdAccount.Id);
     Assert.AreEqual("AUD", createdAccount.Currency); // It seems that currency is determined by country
     Assert.IsNotNull(createdAccount.CreatedAt);
     Assert.IsNotNull(createdAccount.UpdatedAt);
 }
Exemplo n.º 3
0
        public void CreatePayPalAccountSuccessfully()
        {
            var content = File.ReadAllText("../../Fixtures/paypal_account_create.json");
            var client = GetMockClient(content);
            var repo = new PayPalAccountRepository(client.Object);

            var userId = "ec9bf096-c505-4bef-87f6-18822b9dbf2c"; //some user created before
            var account = new PayPalAccount
            {
                UserId = userId,
                Active = true,
                PayPal = new PayPal
                {
                    Email = "*****@*****.**"
                }
            };
            var createdAccount = repo.CreatePayPalAccount(account);
            Assert.IsNotNull(createdAccount);
            Assert.IsNotNull(createdAccount.Id);
            Assert.AreEqual("AUD", createdAccount.Currency); // It seems that currency is determined by country
            Assert.IsNotNull(createdAccount.CreatedAt);
            Assert.IsNotNull(createdAccount.UpdatedAt);
        }