Ejemplo n.º 1
0
        private Discrepancy ReturnIfIsADiscrepency(PageResult expectedPage, PageResult actualPage)
        {
            Discrepancy discrepancy = null;
            if (expectedPage == null)
            {
                discrepancy = new Discrepancy { Actual = actualPage, Expected = null, DiscrepencyType = DiscrepencyType.UnexpectedPageInResult };
            }
            else
            {
                if (expectedPage.HttpStatusCode != actualPage.HttpStatusCode &&
                    (!IsServerUnavailable(expectedPage) &&
                    !IsServerUnavailable(actualPage)) )
                {
                    discrepancy = new Discrepancy { Actual = actualPage, Expected = expectedPage, DiscrepencyType = DiscrepencyType.UnexpectedHttpStatus };
                }

            }

            return discrepancy;
        }