Exemplo n.º 1
0
        public void DisjointSetForestClearTest()
        {
            // empty
            DisjointSetForest <Int32> disjointSetInt = new DisjointSetForest <Int32>();

            disjointSetInt.Clear();

            disjointSetInt.Count.ShouldBe(0);
            disjointSetInt.SetCount.ShouldBe(0);

            // filled
            disjointSetInt = new DisjointSetForest <Int32>(this.values);

            disjointSetInt.Clear();

            disjointSetInt.Count.ShouldBe(0);
            disjointSetInt.SetCount.ShouldBe(0);
        }
        public void DisjointSetForestClearTest()
        {
            // empty

            DisjointSetForest <Int32> disjointSetInt = new DisjointSetForest <Int32>();

            disjointSetInt.Clear();

            Assert.AreEqual(0, disjointSetInt.Count);
            Assert.AreEqual(0, disjointSetInt.SetCount);


            // filled

            disjointSetInt = new DisjointSetForest <Int32>(_values);

            disjointSetInt.Clear();

            Assert.AreEqual(0, disjointSetInt.Count);
            Assert.AreEqual(0, disjointSetInt.SetCount);
        }