Ejemplo n.º 1
0
 public void Doit_pas_retourner_de_prediction_constante()
 {
     var visitor = new AutocompleteVisitor(ref registry, new List<OperandeVariable>());
       var tmp = visitor.Visit(newVar);
       Assert.AreEqual(0, tmp
     .Where(prediction => prediction.Expression is OperandeConstante)
     .Count());
 }
Ejemplo n.º 2
0
 public void Doit_retourner_prediction_methode_d_instance()
 {
     registry.GetClassById(classId).AddMethod("method");
       var visitor = new AutocompleteVisitor(ref registry, new List<OperandeVariable>());
       var tmp = visitor.Visit(newVar);
       Assert.AreEqual(1, tmp
     .Where(prediction => prediction.Expression is MethodExpression)
     .Count());
 }
Ejemplo n.º 3
0
 public void Doit_pas_retourner_de_prediction_variable()
 {
     registry.GetClassById(classId).AddMethod("staticMethod", null, null, true);
       var visitor = new AutocompleteVisitor(ref registry, new List<OperandeVariable>() { newVar});
       var tmp = visitor.Visit(newVar);
       Assert.AreEqual(0, tmp
     .Where(prediction => prediction.Expression is OperandeVariable)
     .Count());
 }
Ejemplo n.º 4
0
 public void Doit_retourner_prediction_operateur_avec_seulement_egal()
 {
     var visitor = new AutocompleteVisitor(ref registry, new List<OperandeVariable>());
       var tmp = visitor.Visit(newVar);
       Assert.AreEqual(1, tmp
     .Where(prediction => prediction.Expression is OperatorExpression)
     .Count());
       Assert.IsTrue(tmp
     .Where(prediction => prediction.Expression is OperatorExpression)
     .Select(prediction => prediction.Expression)
     .Cast<OperatorExpression>()
     .FirstOrDefault()
     .Operator == OPERATOR.EQUAL);
 }