public void GetUserForPayPalAccountSuccessfully() { var id = "3a780d4a-5de0-409c-9587-080930ddea3c"; var content = File.ReadAllText("../../Fixtures/paypal_account_get_users.json"); var client = GetMockClient(content); var repo = new PayPalAccountRepository(client.Object); var userId = "ec9bf096-c505-4bef-87f6-18822b9dbf2c"; //some user created before var gotUser = repo.GetUserForPayPalAccount(id); Assert.IsNotNull(gotUser); Assert.AreEqual(userId, gotUser.Id); }
public void GetUserForPayPalAccountSuccessfully() { var id = "3a780d4a-5de0-409c-9587-080930ddea3c"; var content = File.ReadAllText("../../Fixtures/paypal_account_get_users.json"); var client = GetMockClient(content); var repo = new PayPalAccountRepository(client.Object); var userId = "ec9bf096-c505-4bef-87f6-18822b9dbf2c"; //some user created before var resp = repo.GetUserForPayPalAccount(id); Assert.IsNotNull(resp); var users = JsonConvert.DeserializeObject <IDictionary <string, object> >(JsonConvert.SerializeObject(resp["users"])); Assert.AreEqual(userId, users["id"]); }