public AssertSTInfo(VariableDeclaration variable, VariableAssignmentManager VAssignmentManager, Statement assertStatment, MethodDefinition method)
 {
     if (variable != null)
     {
         var listPath = VAssignmentManager.GetPathByVariable(variable);
         foreach (var path in listPath)
         {
             ListPath.Add(path);
         }
     }
     this.Variable       = variable;
     this.AssertStatment = assertStatment;
     this.Method         = method;
     focalStmt           = FindThisFocalMethodStmt();
 }
Beispiel #2
0
        /// <summary>
        /// Init the method analyzer and analyze the method automatically
        /// </summary>
        /// <param name="method"></param>
        public TestCaseAnalyzer(MethodDefinition method)
        {
            Method                 = method;
            ParametersInfo         = new HashSet <VariableInfo>();
            VariablesInfo          = new HashSet <VariableInfo>();
            SetSelfFields          = new HashSet <VariableDeclaration>();
            GetSelfFields          = new HashSet <VariableDeclaration>();
            PropertyFields         = new HashSet <VariableDeclaration>();
            InvokedExternalMethods = new HashSet <MethodDefinition>();
            InvokedLocalMethods    = new HashSet <MethodDefinition>();
            IsReturnNewObj         = false;

            VAssignmentManager  = new VariableAssignmentManager();
            this.ListAssertInfo = new List <AssertSTInfo>();
            Analyze();
        }