Example #1
0
        public bool ProcessParallel(IResultSetService actual)
        {
            Trace.WriteLineIf(Extensibility.NBiTraceSwitch.TraceVerbose, string.Format("Queries exectued in parallel."));

            Parallel.Invoke(
                () => { rsChild = actual.Execute(); },
                () => { rsParent = parentService.Execute(); }
                );

            return(Matches(rsChild));
        }
Example #2
0
        public virtual bool ProcessParallel(IResultSetService actual)
        {
            Trace.WriteLineIf(Extensibility.NBiTraceSwitch.TraceVerbose, string.Format("Queries exectued in parallel."));

            Parallel.Invoke(
                () => { rsCandidate = actual.Execute(); },
                () => { rsReference = referenceService.Execute(); }
                );

            return(Matches(rsCandidate));
        }
Example #3
0
        protected bool doMatch(ResultSet actual)
        {
            actualResultSet = actual;

            //This is needed if we don't use //ism
            if (expectedResultSet == null)
            {
                expectedResultSet = expect.Execute();
            }

            result = Engine.Compare(actualResultSet, expectedResultSet);
            var output = result.Difference == ResultSetDifferenceType.None;

            if (output && Configuration?.FailureReportProfile.Mode == FailureReportMode.Always)
            {
                Assert.Pass(Failure.RenderMessage());
            }

            return(output);
        }
Example #4
0
        /// <summary>
        /// Handle an IDbCommand (Query and ConnectionString) and check it with the expectation (Another IDbCommand or a ResultSet)
        /// </summary>
        /// <param name="actual">IDbCommand</param>
        /// <returns></returns>
        public bool Process(IResultSetService actual)
        {
            ResultSet rsActual = null;

            if (parallelizeQueries)
            {
                rsActual = ProcessParallel(actual);
            }
            else
            {
                rsActual = actual.Execute();
            }

            return(this.Matches(rsActual));
        }
Example #5
0
        public ResultSet ProcessParallel(IResultSetService actual)
        {
            Trace.WriteLineIf(NBiTraceSwitch.TraceVerbose, string.Format("Queries exectued in parallel."));

            ResultSet rsActual = null;

            System.Threading.Tasks.Parallel.Invoke(
                () => {
                rsActual = actual.Execute();
            },
                () => {
                expectedResultSet = expect.Execute();
            }
                );

            return(rsActual);
        }