public void CheckIfStringsAreAnagramsShouldReturnZero() { var input1 = "abc"; var input2 = "cba"; var expectedOutput = 0; var makingAnagrams = new MakingAnagrams(); var output = makingAnagrams.CheckAnagram(input1, input2); Assert.AreEqual(expectedOutput, output); }
public void IfStringTwoIsLongerCountExtraLetters() { var input1 = "abc"; var input2 = "abcd"; var expectedOutput = 1; var makingAnagrams = new MakingAnagrams(); var output = makingAnagrams.CheckAnagram(input1, input2); Assert.AreEqual(expectedOutput, output); }
public void MustReturnAnInteger() { var input1 = "a"; var input2 = "a"; var makingAnagrams = new MakingAnagrams(); var output = makingAnagrams.CheckAnagram(input1, input2); bool shouldBeInteger = true; bool ourOutputIsInteger = (output.GetType() == typeof(int)); Assert.AreEqual(shouldBeInteger, ourOutputIsInteger); }