//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace LoadTest {
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.TestTools.WebTesting;
using Microsoft.VisualStudio.TestTools.WebTesting.Rules;
public class GetItemCoded : WebTest {
public GetItemCoded() {
this.Context.Add("WebServer", "");
this.PreAuthenticate = true;
this.Proxy = "default";
}
public override IEnumerator GetRequestEnumerator() {
// Initialize validation rules that apply to all requests in the WebTest
if ((this.Context.ValidationLevel >= Microsoft.VisualStudio.TestTools.WebTesting.ValidationLevel.Low)) {
ValidateResponseUrl validationRule1 = new ValidateResponseUrl();
this.ValidateResponse += new EventHandler(validationRule1.Validate);
}
if ((this.Context.ValidationLevel >= Microsoft.VisualStudio.TestTools.WebTesting.ValidationLevel.Low)) {
ValidationRuleResponseTimeGoal validationRule2 = new ValidationRuleResponseTimeGoal();
validationRule2.Tolerance = 0D;
this.ValidateResponseOnPageComplete += new EventHandler(validationRule2.Validate);
}
WebTestRequest request1 = new WebTestRequest((this.Context["WebServer"].ToString() + "/api/v1/Catalog/Items/1"));
request1.Headers.Add(new WebTestRequestHeader("Referer", (this.Context["WebServer"].ToString() + "/swagger/")));
yield return request1;
request1 = null;
}
}
}