Example #1
0
        public void TestGetUniqueArrayLengthForSameArray()
        {
            int[] input = new int[] { 0, 0, 0, 0 };

            RemoveDuplicate removeDuplicate = new RemoveDuplicate();
            var             result          = removeDuplicate.RemoveDuplicates(input);

            Assert.AreEqual(1, result);
        }
Example #2
0
        public void TestGetUniqueArrayLengthForDistinctElement()
        {
            int[] input = new int[] { 0, 1, 2, 3, 4 };

            RemoveDuplicate removeDuplicate = new RemoveDuplicate();
            var             result          = removeDuplicate.RemoveDuplicates(input);

            Assert.AreEqual(5, result);
        }