Esempio n. 1
0
        public BaseHttpStep(string url, IExpectedContent expectedData, bool canBeRunInParallel = false)
        {
            Guard.IsNotNull(url, nameof(url));
            Guard.IsNotNull(httpClient, nameof(httpClient));
            Guard.IsNotNull(expectedData, nameof(expectedData));

            this.CanBeRunInParallel = canBeRunInParallel;
        }
Esempio n. 2
0
        public ComparisonResult(ITestStep testStep, IExpectedContent expectedContent, IActualContent actualContent)
        {
            Guard.IsNotNull(testStep, nameof(testStep));
            Guard.IsNotNull(expectedContent, nameof(expectedContent));
            Guard.IsNotNull(actualContent, nameof(actualContent));

            this.Step  = testStep;
            lazyResult = new Lazy <bool>(() => expectedContent.CompareTo(actualContent));
        }
Esempio n. 3
0
        private void ParseInlineAssert(string actionString)
        {
            string assertValue = this.ExtractAssertValue(actionString);

            if (assertValue.IsNullOrEmpty())
            {
                throw new ApplicationException("Unable to extract in-line assert value");
            }

            this.expectedContent = this.expectedContentFactory.CreateExpectedScalarContent(assertValue);
        }
Esempio n. 4
0
 public HttpGetStep(
     string url,
     IHttpClient httpClient,
     IExpectedContent expectedData,
     bool canBeRunInParallel = false)
     : base(
         url,
         expectedData,
         canBeRunInParallel)
 {
     Guard.IsNotNull(httpClient, nameof(httpClient));
     this.httpClient = httpClient;
 }