예제 #1
0
        public void DisjointSetForestEnumeratorTest()
        {
            DisjointSetForest <Int32> disjointSetInt  = new DisjointSetForest <Int32>(this.values);
            IEnumerator         enumerator            = this.values.GetEnumerator();
            IEnumerator <Int32> disjointSetEnumerator = disjointSetInt.GetEnumerator();

            while (enumerator.MoveNext())
            {
                disjointSetEnumerator.MoveNext().ShouldBeTrue();
                disjointSetEnumerator.Current.ShouldBe(enumerator.Current);
            }
        }
        public void DisjointSetForestEnumeratorTest()
        {
            DisjointSetForest <Int32> disjointSetInt  = new DisjointSetForest <Int32>(_values);
            IEnumerator         enumerator            = _values.GetEnumerator();
            IEnumerator <Int32> disjointSetEnumerator = disjointSetInt.GetEnumerator();

            while (enumerator.MoveNext())
            {
                Assert.IsTrue(disjointSetEnumerator.MoveNext());
                Assert.AreEqual(enumerator.Current, disjointSetEnumerator.Current);
            }
        }