コード例 #1
0
        public void TestRemoveDuplicateString()
        {
            string actual   = "aabbc";
            string expected = "abc";

            Assert.IsTrue(StringRemoveDuplicateChar.RemoveDuplicateChar(actual).Equals(expected));

            actual = "abcabcaa";
            Assert.IsTrue(StringRemoveDuplicateChar.RemoveDuplicateChar(actual).Equals(expected));

            actual = "abc";
            Assert.IsTrue(StringRemoveDuplicateChar.RemoveDuplicateChar(actual).Equals(expected));
        }
コード例 #2
0
 public void TestEmptyString()
 {
     Assert.IsTrue(string.IsNullOrEmpty(StringRemoveDuplicateChar.RemoveDuplicateChar(string.Empty)));
 }