public async Task ShowcaseShouldLimitResults() { var result = new ShowcaseSearchRequest("1", 10) .Perform(new DefaultHttpPostClient()) .Result; Assert.Equal(10, result.Results.Length); Assert.True(result.NextPage); TraceObject(result); }
public async Task ShowcaseShouldSearchByName() { var result = new ShowcaseSearchRequest("мгтс") .Perform(new DefaultHttpPostClient()) .Result; Assert.NotNull(result); Assert.NotNull(result.Results); Assert.NotEmpty(result.Results); TraceObject(result); }
public async Task ShowcaseShouldReturnFormParams() { var merchants = new ShowcaseSearchRequest("1") .Perform(new DefaultHttpPostClient()) .Result .Results; //TraceObject(merchants); foreach (var merchant in merchants) { if (!merchant.IsFormDescriptionAvailable) { TraceWrite("Form params not available for merchant {0} (id {1})", merchant.Title, merchant.Id); continue; } try { var merchantParams = new ShowcaseFormParamsRequest(merchant.Id, merchant.Params) .Perform(new DefaultHttpPostClient()) .Result; TraceObject(merchantParams); } catch (Exception ex) { TraceWrite("Unable to get form params for merchant {0} (id {1})", merchant.Title, merchant.Id); } } //Assert.NotNull(merchantParams); //Assert.NotNull(merchantParams.Form); //Assert.NotEmpty(merchantParams.Form); //TraceObject(merchantParams); }
public async Task ShowcaseShouldReturnFormParams() { var merchants = new ShowcaseSearchRequest("1") .Perform(new DefaultHttpPostClient()) .Result .Results; //TraceObject(merchants); foreach (var merchant in merchants) { if (!merchant.IsFormDescriptionAvailable) { TraceWrite("Form params not available for merchant {0} (id {1})", merchant.Title, merchant.Id); continue; } try { var merchantParams= new ShowcaseFormParamsRequest(merchant.Id, merchant.Params) .Perform(new DefaultHttpPostClient()) .Result; TraceObject(merchantParams); } catch (Exception ex) { TraceWrite("Unable to get form params for merchant {0} (id {1})", merchant.Title, merchant.Id); } } //Assert.NotNull(merchantParams); //Assert.NotNull(merchantParams.Form); //Assert.NotEmpty(merchantParams.Form); //TraceObject(merchantParams); }