Package org.drools.guvnor.client.modeldriven.testing

Examples of org.drools.guvnor.client.modeldriven.testing.RetractFact


        sc.fixtures.add( new VerifyFact( "c1",
                                         ls( new VerifyField( "type",
                                                              "XXX",
                                                              "==" ) ) ) );

        sc.fixtures.add( new RetractFact( "c2" ) );
        sc.fixtures.add( new ExecutionTrace() );

        sc.fixtures.add( new VerifyFact( "c1",
                                         ls( new VerifyField( "type",
                                                              "rule4",
View Full Code Here


                            factHandles.put(fact.name, wm.insert(f));
                        }
                    });
        }
      } else if (fx instanceof RetractFact) {
        RetractFact f = (RetractFact)fx;
        this.workingMemory.retract(this.factHandles.get(f.name));
        this.populatedData.remove(f.name);
      } else if (fx instanceof ExecutionTrace) {
                doPopulate(toPopulate);
        ExecutionTrace executionTrace = (ExecutionTrace)fx;
View Full Code Here

          populateFields(fact, populatedData, f);
          populatedData.put(fact.name, f);
          this.factHandles.put(fact.name, wm.insert(f));
        }
      } else if (fx instanceof RetractFact) {
        RetractFact f = (RetractFact)fx;
        this.workingMemory.retract(this.factHandles.get(f.name));
        this.populatedData.remove(f.name);
      } else if (fx instanceof ExecutionTrace) {
        ExecutionTrace executionTrace = (ExecutionTrace)fx;
        //create the listener to trace rules
View Full Code Here

                            factHandles.put(fact.name, wm.insert(f));
                        }
                    });
        }
      } else if (fx instanceof RetractFact) {
        RetractFact f = (RetractFact)fx;
        this.workingMemory.retract(this.factHandles.get(f.name));
        this.populatedData.remove(f.name);
      } else if (fx instanceof ExecutionTrace) {
                doPopulate(toPopulate);
        ExecutionTrace executionTrace = (ExecutionTrace)fx;
View Full Code Here

        sc.fixtures.add(new FactData("B", "B", new ArrayList(), true));
        sc.fixtures.add(new FactData("C", "C", new ArrayList(), true));
        ExecutionTrace ex1 = new ExecutionTrace();
        sc.fixtures.add(ex1);
        sc.fixtures.add(new VerifyFact());
        sc.fixtures.add(new RetractFact());
        sc.fixtures.add(new FactData("D", "D", new ArrayList(), false));
        sc.fixtures.add(new FactData("E", "E", new ArrayList(), false));
        ExecutionTrace ex2 = new ExecutionTrace();
        sc.fixtures.add(ex2);
        sc.fixtures.add(new VerifyFact());
View Full Code Here

    sc.fixtures.add(new FactData("Q", "q", new ArrayList(), true));
    sc.fixtures.add(new FactData("Z", "z", new ArrayList(), false));
    ExecutionTrace ex1 = new ExecutionTrace();

    sc.fixtures.add(ex1);
    sc.fixtures.add(new RetractFact("z"));
    sc.fixtures.add(new FactData("Y", "y", new ArrayList(), false));

    ExecutionTrace ex2 = new ExecutionTrace();
    sc.fixtures.add(ex2);
View Full Code Here

    ExecutionTrace ex1 = new ExecutionTrace();
    FactData fd4 = new FactData("I", "i", new ArrayList(), false);
    sc.globals.add(fd4);

    sc.fixtures.add(ex1);
    sc.fixtures.add(new RetractFact("z"));
    sc.fixtures.add(new FactData("Z", "z", new ArrayList(), true));
    sc.fixtures.add(new VerifyFact("q", new ArrayList()));

    assertFalse(sc.isFactNameUsed(fd1));
    assertTrue(sc.isFactNameUsed(fd2));
View Full Code Here

        sc.fixtures.add( new VerifyFact( "c1",
                                         ls( new VerifyField( "type",
                                                              "XXX",
                                                              "==" ) ) ) );

        sc.fixtures.add( new RetractFact( "c2" ) );
        sc.fixtures.add( new ExecutionTrace() );

        sc.fixtures.add( new VerifyFact( "c1",
                                         ls( new VerifyField( "type",
                                                              "rule4",
View Full Code Here

        sc.fixtures.add( new VerifyFact( "c1",
                                         ls( new VerifyField( "type",
                                                              "XXX",
                                                              "==" ) ) ) );

        sc.fixtures.add( new RetractFact( "c2" ) );
        sc.fixtures.add( new ExecutionTrace() );

        sc.fixtures.add( new VerifyFact( "c1",
                                         ls( new VerifyField( "type",
                                                              "rule4",
View Full Code Here

              for (int j = 0; j < varsInScope.size(); j++) { retractFacts.addItem((String) varsInScope.get(j));}
              add = new Button(constants.Add());
              add.addClickListener(new ClickListener() {
            public void onClick(Widget w) {
              String fn = retractFacts.getItemText(retractFacts.getSelectedIndex());
              scenario.insertBetween(previousEx, new RetractFact(fn));
              renderEditor();
              pop.hide();
            }
          });
              HorizontalPanel retractFact = new HorizontalPanel();
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.modeldriven.testing.RetractFact

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.