コード例 #1
0
        public void AddToList_WhenAnagram_ThenNgrm()
        {
            string input  = "anagram";
            var    output = new List <char>()
            {
                'n', 'g', 'r', 'm'
            };

            Assert.AreEqual(output, uniqueCharacter.UniqueCharacters(input));
        }
コード例 #2
0
        public void UniqueCharactersTest()
        {
            string inputWord = "catt";

            char[] output = { 'c', 'a', 't' };
            Assert.AreEqual(output, Unique.UniqueCharacters(inputWord));
        }
コード例 #3
0
        public void UniqueCharactersTestWithUppercase()
        {
            string inputWord = "CaTt";

            char[] output = { 'c', 'a', 't' };
            Assert.AreEqual(output, Unique.UniqueCharacters(inputWord));
        }
コード例 #4
0
        public void TestMethod3()
        {
            var unique = new Unique();

            string text = "Anothervariant";

            char expected = 'A';
            char output   = Unique.UniqueCharacters(text)[0];

            Assert.AreEqual(expected, output);
        }
コード例 #5
0
        public void TestMethod2()
        {
            var unique = new Unique();

            string text = "othertext";

            char expected = 'h';
            char output   = Unique.UniqueCharacters(text)[1];

            Assert.AreEqual(expected, output);
        }
コード例 #6
0
        public void TestMethod1()
        {
            var unique = new Unique();

            string text = "apple";

            char expected = 'a';
            char output   = Unique.UniqueCharacters(text)[0];

            Assert.AreEqual(expected, output);
        }