public async Task List() { var test = CreateHttpTest() .ExpectUriPath("promotions") .ResponseBodyFromFile("promotion/promotion_filtered_page.json"); var expected = test.ResponseBody <Page <Promotion> >(); var operations = new PromotionOperations(test.HttpClient, BaseUri, ClientId, ClientSecret, ReloadlyEnvironment.Sandbox); var actual = await operations.ListAsync(); VerifyList(expected.Content, actual.Content); }
public async Task GetByOperatorId() { var test = CreateHttpTest() .ExpectUriPath("promotions/operators/123") .ResponseBodyFromFile("promotion/promotion_list_by_operator.json"); var expected = test.ResponseBody <IList <Promotion> >(); var operations = new PromotionOperations(test.HttpClient, BaseUri, ClientId, ClientSecret, ReloadlyEnvironment.Sandbox); var actual = await operations.GetByOperatorIdAsync(123); VerifyList(expected, actual); }