Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }