public void GetInverse_ReturnValueContainsTwoExpressions_WhenExpressionContainsTwoElements()
        {
            var secondExpression = Substitute.For <IExpression>();
            var concatExpression = new ConcatenationExpressionTest(_randomGenerator);

            concatExpression.Append(_expression).Append(secondExpression);

            concatExpression.GetInverse();

            secondExpression.Received(1).GetInverse();
            _expression.Received(1).GetInverse();
        }
        public void ToSingleRegexString_ReturnsUlrike_WhenConcatExpressionContainsOneElementReturningFranziska()
        {
            var mock = new StringBuilderMock(ToCharacterClassList("Ulrike"));

            _expression.ToStringBuilder().Returns(mock);
            var concatExpression = new ConcatenationExpressionTest(_randomGenerator);

            concatExpression.Append(_expression);

            var result = concatExpression.ToSingleStringBuilder().GenerateString();

            Assert.AreEqual("Ulrike", result);
        }
        public void ToSingleRegexString_ReturnsJaFran_WhenConcatExpressionContainsTwoElementReturningFranziskaAndJ()
        {
            var mock1            = new StringBuilderMock(ToCharacterClassList("Fran"));
            var mock2            = new StringBuilderMock(ToCharacterClassList("Ja"));
            var secondExpression = Substitute.For <IExpression>();

            secondExpression.ToStringBuilder().Returns(mock1);
            _expression.ToStringBuilder().Returns(mock2);
            var concatExpression = new ConcatenationExpressionTest(_randomGenerator);

            concatExpression.Append(_expression).Append(secondExpression);

            var result = concatExpression.ToSingleStringBuilder().GenerateString();

            Assert.AreEqual("JaFran", result);
        }