Exemplo n.º 1
0
        public void ReplaceDuplicatesInPlaceTest_HappyCase()
        {
            int uniqueElems = ReplaceDuplicatesInPlace.Execute(new [] { 1, 1, 2 });

            Assert.AreEqual(2, uniqueElems, "There should have been 2 unique elements in the array");
        }
Exemplo n.º 2
0
        public void ReplaceDuplicatesWithEmptyArray()
        {
            int uniqueElems = ReplaceDuplicatesInPlace.Execute(new int [] {});

            Assert.AreEqual(0, uniqueElems, "There must be no unique elements in an empty array");
        }