public void NullSnapshotTest()
        {
            // Arrange
            var parentReferenceEater = new ParentReferenceEater(Mock.Of<IEater>());

            // Assert
            Assert.Throws<ArgumentNullException>(() => parentReferenceEater.Eat(null, Mock.Of<IInvocationExpression>()));
        }
        public void ReturnNoneIfInvocationQualifierNullTest()
        {
            // Arrange
            var eater = Mock.Of<IEater>();
            var invocationExpression = Mock.Of<IInvocationExpression>();
            var snapshot = Mock.Of<ISnapshot>();
            var parentReferenceEater = new ParentReferenceEater(eater);

            // Act
            var kind = parentReferenceEater.Eat(snapshot, invocationExpression);

            // Assert
            Assert.AreEqual(kind, ExpressionKind.None);
        }
        public void ReturnEatResultOfInvocationQualifierReferenceTest()
        {
            // Arrange
            var snapshot = Mock.Of<ISnapshot>();
            var expression = Mock.Of<ICSharpExpression>();
            var eater = Mock.Of<IEater>(t => t.Eat(snapshot, expression) == ExpressionKind.StubCandidate);
            var managedConverible = new Mock<ExtensionArgumentInfo>(Mock.Of<ICSharpInvocationInfo>(), Mock.Of<ICSharpExpression>());
            var invocationExpression = Mock.Of<IInvocationExpression>(t => t.ExtensionQualifier.ManagedConvertible == managedConverible.Object);
            var parentReferenceEater = new ParentReferenceEater(eater);

            // Act
            var kind = parentReferenceEater.Eat(snapshot, invocationExpression);

            // Assert
            Assert.AreEqual(kind, ExpressionKind.StubCandidate);
        }
        public void ReturnNoneIfInvocationQualifierReferenceIsNotExtensionArgumentInfoTest()
        {
            // Arrange
            var eater = Mock.Of<IEater>();
            var managedConverible = Mock.Of<IManagedConvertible>();
            var invocationExpression = Mock.Of<IInvocationExpression>(t => t.ExtensionQualifier.ManagedConvertible == managedConverible);
            var snapshot = Mock.Of<ISnapshot>();
            var parentReferenceEater = new ParentReferenceEater(eater);

            // Act
            var kind = parentReferenceEater.Eat(snapshot, invocationExpression);

            // Assert
            Assert.AreEqual(kind, ExpressionKind.None);
        }