/// <summary>
        /// Returns the number of contained test cases which are of the specified Result type.
        /// </summary>
        /// <param name="types">The result types to lookup</param>
        /// <returns>The number of contained test cases which are of the specified Result type.</returns>
        private uint GetCount(IEnumerable <TestResultType> types)
        {
            if (this.Collection == null)
            {
                if (this.Unit is TestCase)
                {
                    return((types.Contains(this.Result)) ? 1u : 0u);
                }
            }
            else
            {
                TestCaseResultVisitor visitor = new TestCaseResultVisitor(this.Collection, types);
                this.Unit.Apply(visitor);
                return(visitor.Count);
            }

            return(0u);
        }
        /// <summary>
        /// Returns the number of contained test cases which are of the specified Result type.
        /// </summary>
        /// <param name="types">The result types to lookup</param>
        /// <returns>The number of contained test cases which are of the specified Result type.</returns>
        private uint GetCount(IEnumerable<TestResultType> types)
        {
            if (this.Collection == null)
            {
                if (this.Unit is TestCase)
                {
                    return (types.Contains(this.Result)) ? 1u : 0u;
                }
            }
            else
            {
                TestCaseResultVisitor visitor = new TestCaseResultVisitor(this.Collection, types);
                this.Unit.Apply(visitor);
                return visitor.Count;
            }

            return 0u;
        }