Example #1
0
        public void ShoouldRetunZeroWhenInputIsEmptyOrNoDuplicate()
        {
            var i = string.Empty;
            DuplicateFounder duplicateFounder = new DuplicateFounder();

            Assert.IsTrue(duplicateFounder.FindOccurence(i, 2) == 0);
            i = "abc";
            Assert.IsTrue(duplicateFounder.FindOccurence(i, 2) == 0);
        }
Example #2
0
        public void ShoouldRetun1When1TripleChar()
        {
            var i = "aaadferb";
            DuplicateFounder duplicateFounder = new DuplicateFounder();

            Assert.AreEqual(duplicateFounder.FindOccurence(i, 3), 1);
        }