예제 #1
0
        public void Test_AreAnagrams_InputWithDifferentLength_ExpectedFalse()
        {
            var anagram = new Anagrams();
            var result  = anagram.AreAnagrams("Debit car", "Bad credit");

            Assert.IsFalse(result);
        }
예제 #2
0
        public void Test_AreAnagrams_InputWithEqualLengthAndCharacters_ExpectedTrue()
        {
            var anagram = new Anagrams();
            var result  = anagram.AreAnagrams("Debit card", "Bad credit");

            Assert.IsTrue(result);
        }
예제 #3
0
        public void Test_Reverse_InputEmptyOrNullStringSecondParam_ExpectedYourEntryIsInvalid()
        {
            var anagram = new Anagrams();

            string[] tests = { string.Empty, null };

            foreach (var test in tests)
            {
                var result = anagram.AreAnagrams("Bad credit", test);
                Assert.IsFalse(result);
            }
        }