public void FindMethodInvocationsInSingleStatement()
        {
            var methodInvocation = PythonCodeGenerator.GenerateDefaultMethodInvocation(0);
            var finder           = BuildFinder(methodInvocation);

            var invokedMethods = finder.FindMethodInvocations();

            Assert.AreEqual(1, invokedMethods.Count());
        }
Beispiel #2
0
        public void FindMethodInvocation()
        {
            const string variableId       = "newVariable";
            var          methodInvocation = PythonCodeGenerator.GenerateDefaultMethodInvocation(0);
            var          statement        = PythonCodeGenerator.GenerateAssignStatement(variableId, methodInvocation, 0);
            var          finder           = BuildFinder(statement);

            var invokedMethods = finder.FindMethodInvocations();

            Assert.AreEqual(1, invokedMethods.Count());
        }