Exemple #1
0
        public void CompareAndRemove(T[] data, int index, int count)
        {
            count += index;

            while (0 < _queue.Count && index < count)
            {
                T currentItem = _queue.Dequeue();

                if (!_comparer.Equals(currentItem, data[index]))
                {
                    PortsTest.Fail("Err_84264lked Expected {0} actual {1}", data[index], currentItem);
                }

                ++index;
            }

            if (index != count)
            {
                PortsTest.Fail("Err_5587456jdivmeo Expected to iterate through {0} items actual {1}", count, index);
            }
        }
Exemple #2
0
        public void Compare(T[] data, int index, int count)
        {
            IEnumerator <T> enumerator = _queue.GetEnumerator();

            count += index;

            while (enumerator.MoveNext() && index < count)
            {
                if (!_comparer.Equals(enumerator.Current, data[index]))
                {
                    PortsTest.Fail("Err_84264lked Expected {0} actual {1}", data[index], enumerator.Current);
                }

                ++index;
            }

            if (index != count)
            {
                PortsTest.Fail("Err_5587456jdivmeo Expected to iterate through {0} items actual {1}", count, index);
            }
        }