/// <summary>
 /// Creates an instance of ExtractionRule.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="description"></param>
 public ExtractionRule(string name, string description)
 {
     _context = WebTestContext.GetContext();
     _ruleName = name;
     _ruleDescription = description;
     _required = false;
 }
 /// <summary>
 /// Creates an instance of ExtractionRule.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="description"></param>
 public ExtractionRule(string name, string description)
 {
     _context         = WebTestContext.GetContext();
     _ruleName        = name;
     _ruleDescription = description;
     _required        = false;
 }
        /// <summary>
        /// Gets a reference to the instance of the context.
        /// </summary>
        /// <returns></returns>
        public static WebTestContext GetContext()
        {
            if (WebTestContext.__context == null)
            {
                WebTestContext.__context = new WebTestContext();
            }

            return(WebTestContext.__context);
        }
示例#4
0
 /// <summary>
 /// Initializes the web request object for this WebTestRequest.
 /// </summary>
 private void InitializeWebRequest()
 {
     _webRequest = WebRequest.Create(_uri) as HttpWebRequest;
     _webRequest.AllowAutoRedirect = true;
     _webRequest.KeepAlive         = true;
     _webRequest.Method            = "GET";
     _webRequest.Timeout           = 60000;
     _webRequest.UserAgent         = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b12) Gecko/20100101 Firefox/4.0b12";
     _thinkTime       = 0;
     _context         = WebTestContext.GetContext();
     _context.Outcome = WebTestOutcome.NotExecuted;
 }
 /// <summary>
 /// Creates an instance of ExtractionRule.
 /// </summary>
 public ExtractionRule()
 {
     _context = WebTestContext.GetContext();
     _required = false;
 }
 /// <summary>
 /// Creates an instance of ValidationRule.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="description"></param>
 public ValidationRule(string name, string description)
 {
     _ruleName = name;
     _ruleDescription = description;
     _context = WebTestContext.GetContext();
 }
 /// <summary>
 /// Creates an instance of ValidationRule.
 /// </summary>
 public ValidationRule()
 {
     _context = WebTestContext.GetContext();
 }
 /// <summary>
 /// Initializes the web request object for this WebTestRequest.
 /// </summary>
 private void InitializeWebRequest()
 {
     _webRequest = WebRequest.Create(_uri) as HttpWebRequest;
     _webRequest.AllowAutoRedirect = true;
     _webRequest.KeepAlive = true;
     _webRequest.Method = "GET";
     _webRequest.Timeout = 60000;
     _webRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b12) Gecko/20100101 Firefox/4.0b12";
     _thinkTime = 0;
     _context = WebTestContext.GetContext();
     _context.Outcome = WebTestOutcome.NotExecuted;
 }
 /// <summary>
 /// Creates an instance of WebTest.
 /// </summary>
 public WebTest()
 {
     _context = WebTestContext.GetContext();
     _guid = Guid.NewGuid();
 }
 /// <summary>
 /// Resets the current context instance.
 /// </summary>
 public void Reset()
 {
     WebTestContext.__context = new WebTestContext();
 }
        /// <summary>
        /// Gets a reference to the instance of the context.
        /// </summary>
        /// <returns></returns>
        public static WebTestContext GetContext()
        {
            if (WebTestContext.__context == null)
            {
                WebTestContext.__context = new WebTestContext();
            }

            return WebTestContext.__context;
        }
 /// <summary>
 /// Creates an instance of ExtractionRule.
 /// </summary>
 public ExtractionRule()
 {
     _context  = WebTestContext.GetContext();
     _required = false;
 }
 /// <summary>
 /// Resets the current context instance.
 /// </summary>
 public void Reset()
 {
     WebTestContext.__context = new WebTestContext();
 }
示例#14
0
 /// <summary>
 /// Creates an instance of WebTest.
 /// </summary>
 public WebTest()
 {
     _context = WebTestContext.GetContext();
     _guid    = Guid.NewGuid();
 }
 /// <summary>
 /// Creates an instance of ValidationRule.
 /// </summary>
 public ValidationRule()
 {
     _context = WebTestContext.GetContext();
 }
 /// <summary>
 /// Creates an instance of ValidationRule.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="description"></param>
 public ValidationRule(string name, string description)
 {
     _ruleName        = name;
     _ruleDescription = description;
     _context         = WebTestContext.GetContext();
 }