public void EatCastType_NullTypeUsageTest()
        {
            // Arrange
            var typeEater = new TypeEater(Mock.Of<EatExpressionHelper>());

            // Assert
            Assert.Throws<ArgumentNullException>(() => typeEater.EatCastType(Mock.Of<ISnapshot>(), null));
        }
        public void EatCastType_PredefinedAsStubCandidateTest()
        {
            // Arrange
            var snapshot = Mock.Of<ISnapshot>();
            var typeUsage = Mock.Of<IPredefinedTypeUsage>();;
            var helper = Mock.Of<EatExpressionHelper>();
            var typeEater = new TypeEater(helper);

            // Act
            var kind = typeEater.EatCastType(snapshot, typeUsage);

            // Assert
            Assert.AreEqual(kind, ExpressionKind.StubCandidate);
        }
        public void EatCastType_UserTypeAsMockTest()
        {
            // Arrange
            var snapshot = Mock.Of<ISnapshot>(t => t.IsInTestScope("ModuleName") == false && t.IsInTestProject("ModuleName") == true);
            var typeUsage = Mock.Of<IUserTypeUsage>();
            var classType = Mock.Of<ITypeElement>(t => t.Module.Name == "ModuleName");
            var helper = Mock.Of<EatExpressionHelper>(t => t.GetUserTypeUsageClass(typeUsage) == classType);
            var typeEater = new TypeEater(helper);

            // Act
            var kind = typeEater.EatCastType(snapshot, typeUsage);

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