예제 #1
0
        public void TestAnagramResultTrue()
        {
            // Arrange
            var anagramFunc = new Testing.Anagram.Anagram();
            // Act
            bool outPut = anagramFunc.IsAnagram("west", "stew");

            // Assert
            Assert.True(outPut);
        }
예제 #2
0
        public void TestAnagramresultFalse()
        {
            //Arrange
            var anagramFunc = new Testing.Anagram.Anagram();

            // Act
            bool outPut = anagramFunc.IsAnagram("expect", "respect");

            // Assert
            Assert.False(outPut);
        }
예제 #3
0
 static void Main(string[] args)
 {
     Testing.Anagram.Anagram anagram = new Testing.Anagram.Anagram();
     Console.WriteLine(anagram.IsAnagram(anagram.UserWrites(), anagram.UserWrites()) ? "anagrams" : "are not anagrams");
 }
예제 #4
0
        public void TestAnagramMultipleResultsFalse(string str1, string str2)
        {
            var anagramFunc = new Testing.Anagram.Anagram();

            Assert.False(anagramFunc.IsAnagram(str1, str2));
        }