public ReferenceExpressionEater(IEater eater, ExpressionKindHelper kindHelper, EatExpressionHelper eatExpressionHelper, ITypeEater typeEater)
     : base(eater)
 {
     _kindHelper          = kindHelper;
     _eatExpressionHelper = eatExpressionHelper;
     _typeEater           = typeEater;
 }
        public ExpressionKind ReferenceKindByParentReferenceKindTest(ExpressionKind kind)
        {
            // Arrange
            var helper = new ExpressionKindHelper();

            // Assert
            return helper.ReferenceKindByParentReferenceKind(kind);
        }
        public ExpressionKind KindOfAssignmentTest(ExpressionKind kind)
        {
            // Arrange
            var helper = new ExpressionKindHelper();

            // Assert
            return helper.KindOfAssignment(kind);
        }
        public void InvocationKindByParentReferenceKind_EatTargetTest()
        {
            // Arrange
            var helper = new ExpressionKindHelper();

            // Act
            var kind = helper.InvocationKindByParentReferenceKind(ExpressionKind.Target);

            // Assert
            Assert.AreEqual(kind, ExpressionKind.TargetCall);
        }
        public void InvocationKindByParentReferenceKindTest()
        {
            // Arrange
            var helper = new ExpressionKindHelper();

            // Assert
            foreach (ExpressionKind kind in Enum.GetValues(typeof(ExpressionKind)))
            {
                if (kind != ExpressionKind.TargetCall && kind != ExpressionKind.Target)
                    Assert.AreEqual(helper.InvocationKindByParentReferenceKind(kind), kind);
            }
        }
 public InvocationExpressionEater(IEater eater,
                                  EatExpressionHelper expressionHelper,
                                  ExpressionKindHelper expressionKindHelper,
                                  IParentReferenceEater parentReferenceEater,
                                  IArgumentsEater argumentsEater,
                                  IMockOfInvocationEater mockOfInvocationEater)
     : base(eater)
 {
     _expressionHelper      = expressionHelper;
     _expressionKindHelper  = expressionKindHelper;
     _parentReferenceEater  = parentReferenceEater;
     _argumentsEater        = argumentsEater;
     _mockOfInvocationEater = mockOfInvocationEater;
 }
 public AsExpressionEater(IEater eater, ITypeEater typeEater, ExpressionKindHelper kindHelper)
     : base(eater)
 {
     _typeEater  = typeEater;
     _kindHelper = kindHelper;
 }
 public AssignmentExpressionEater(IEater eater, EatExpressionHelper eatExpressionHelper, ExpressionKindHelper expressionKindHelper)
     : base(eater)
 {
     _eatExpressionHelper  = eatExpressionHelper;
     _expressionKindHelper = expressionKindHelper;
 }
        public void ValueOfKindAsTypeOfKind_EatAnyValueKindTest()
        {
            // Arrange
            var helper = new ExpressionKindHelper();

            // Assert
            foreach (ExpressionKind valueKind in Enum.GetValues(typeof(ExpressionKind)))
            {
                if (valueKind != ExpressionKind.TargetCall &&
                    valueKind != ExpressionKind.Result &&
                    valueKind != ExpressionKind.Mock &&
                    valueKind != ExpressionKind.Target)
                foreach (ExpressionKind typeKind in Enum.GetValues(typeof(ExpressionKind)))
                {
                    if (typeKind != ExpressionKind.Target)
                        Assert.AreEqual(helper.ValueOfKindAsTypeOfKind(valueKind, typeKind), valueKind);
                }
            }
        }
        public void ValueOfKindAsTypeOfKind_EatTargetTest()
        {
            // Arrange
            var helper = new ExpressionKindHelper();

            // Assert
            foreach (ExpressionKind kind in Enum.GetValues(typeof(ExpressionKind)))
            {
                if (kind != ExpressionKind.TargetCall &&
                    kind != ExpressionKind.Result &&
                    kind != ExpressionKind.Mock)
                Assert.AreEqual(helper.ValueOfKindAsTypeOfKind(ExpressionKind.Target, kind), ExpressionKind.Target);
            }
            foreach (ExpressionKind kind in Enum.GetValues(typeof(ExpressionKind)))
            {
                if (kind != ExpressionKind.TargetCall &&
                    kind != ExpressionKind.Result &&
                    kind != ExpressionKind.Mock)
                    Assert.AreEqual(helper.ValueOfKindAsTypeOfKind(kind, ExpressionKind.Target), ExpressionKind.Target);
            }
        }