public void GetIntersection_ReturnsEmptyString_WhenCharacterClassContainsFfAndIsIntersectedWithNull()
        {
            var charClassFf = new CharacterClassExpression(_alphabet, _randomGenerator, _maxInverseLength);

            charClassFf.AddCharacters(new List <string> {
                "F", "f"
            });

            var result1 = charClassFf.GetIntersection(null).ToStringBuilder().GenerateString();

            Assert.AreEqual(string.Empty, result1);
        }
        public void GetIntersection_ReturnsEmptyString_WhenIntersectedCharacterClassesContainDifferentCharacters()
        {
            var charClassFr = new CharacterClassExpression(_alphabet, _randomGenerator, _maxInverseLength);

            charClassFr.AddCharacters(new List <string> {
                "F", "r"
            });
            var charClassJa = new CharacterClassExpression(_alphabet, _randomGenerator, _maxInverseLength);

            charClassJa.AddCharacters(new List <string> {
                "J", "a"
            });

            var result = charClassJa.GetIntersection(charClassFr).ToStringBuilder().GenerateString();

            Assert.AreEqual(string.Empty, result);
        }
        public void GetIntersection_ReturnsF_WhenCharacterClassContainsFfAndIsIntersectedWithF()
        {
            var charClassFf = new CharacterClassExpression(_alphabet, _randomGenerator, _maxInverseLength);

            charClassFf.AddCharacters(new List <string> {
                "F", "f"
            });
            var charClassF = new CharacterClassExpression(_alphabet, _randomGenerator, _maxInverseLength);

            charClassF.AddCharacters(new List <string> {
                "F"
            });

            var result1 = charClassFf.GetIntersection(charClassF).ToStringBuilder().GenerateString();
            var result2 = charClassF.GetIntersection(charClassFf).ToStringBuilder().GenerateString();

            Assert.AreEqual("F", result1, "charClassFf.GetIntersection(charClassF)");
            Assert.AreEqual("F", result2, "charClassF.GetIntersection(charClassFf)");
        }