Пример #1
0
        public void ShowChargeBuyerSuccessful()
        {
            var content = File.ReadAllText("../../../Fixtures/charges_show_buyer.json");
            var client  = GetMockClient(content);
            var repo    = new ChargeRepository(client.Object);
            var id      = "cb7eafc1-571c-425c-9adc-f56cb585cd68";
            var buyerId = "1be7f54f-c09f-4298-a665-f3a9f1dac60c";

            var response = repo.ShowChargeBuyer(id);
            var buyer    = JsonConvert.DeserializeObject <IDictionary <string, object> >(JsonConvert.SerializeObject(response["users"]));

            Assert.IsNotNull(buyer);
            Assert.AreEqual(buyerId, buyer["id"]);
        }