예제 #1
0
        public void Constructor_WordAsParameter_WordAdded()
        {
            String word = "вертикаль";
            var anagram = new Anagram(word);

            Assert.IsTrue(anagram.Count() == 1 && anagram.Contains(word));
        }
예제 #2
0
        public void TryAdd_ExistingAnagram_NoChangesMade()
        {
            String word = "вертикаль";
            var anagram = new Anagram(word);

            Boolean value = anagram.TryAdd(word);

            Assert.IsTrue(anagram.Count() == 1 && anagram.Contains(word));
        }
예제 #3
0
        public void TryAdd_NewAnagram_AnagramAdded()
        {
            String word = "вертикаль", wordToAdd = "кильватер";
            var anagram = new Anagram(word);

            Boolean value = anagram.TryAdd(wordToAdd);

            Assert.IsTrue(anagram.Count() == 2 && anagram.Contains(word) && anagram.Contains(wordToAdd));
        }