Exemple #1
0
        public void ReturnsFalseIfNotPermutationASCII()
        {
            //act
            bool result = Q1_2.isPermutationASCII(_permutation1, _notpermuation);

            //assert
            Assert.IsFalse(result);
        }
Exemple #2
0
        public void ReturnsTrueIfPermutationASCII()
        {
            //act
            bool result = Q1_2.isPermutationASCII(_permutation1, _permutation2);

            //assert
            Assert.IsTrue(result);
        }
Exemple #3
0
        public void RaisesExceptionIfTwoNullPassed()
        {
            //arrange
            bool result;

            //act
            Action action = () => result = Q1_2.isPermutation(null, null);

            //assert
            Assert.ThrowsException <ArgumentNullException>(action);
        }
Exemple #4
0
        public void TwoEmptyStringsReturnsTrue()
        {
            //arrange
            bool result1;
            bool result2;
            bool result3;

            //act
            result1 = Q1_2.isPermutation("", "");
            result2 = Q1_2.isPermutation(String.Empty, String.Empty);
            result3 = Q1_2.isPermutation(String.Empty, "");

            //assert
            Assert.IsTrue(result1 && result2 && result3);
        }