Examples of SyncWire


Examples of org.openiaml.model.model.wires.SyncWire

   * @return The element found
   */
  public static SyncWire assertHasSyncWire(EObject container, WireSource element1, WireSource element2, String name) throws JaxenException {
    Set<Wire> x = assertHasWiresBidirectional(1, container, element1, element2, SyncWire.class);
    assertEquals(1, x.size());
    SyncWire sw = (SyncWire) x.iterator().next();
    assertEquals(name, sw.getName());
    return sw;
  }
View Full Code Here

Examples of org.openiaml.model.model.wires.SyncWire

   * @return The element found
   */
  public static SyncWire assertHasSyncWire(EObject container, WireSource element1, WireSource element2) throws JaxenException {
    Set<Wire> x = assertHasWiresBidirectional(1, container, element1, element2, SyncWire.class);
    assertEquals(1, x.size());
    SyncWire sw = (SyncWire) x.iterator().next();
    return sw;
  }
View Full Code Here

Examples of org.openiaml.model.model.wires.SyncWire

    assertNotGenerated(instance);

    InputForm form = assertHasInputForm(home, "View News");
    assertNotGenerated(form);

    SyncWire wire = assertHasSyncWire(root, instance, form);
    assertNotGenerated(wire);

  }
View Full Code Here

Examples of org.openiaml.model.model.wires.SyncWire

  public void testSyncWire1() throws JaxenException {
    // get the first sync wire
    List<?> syncWires = query(root, "//iaml:wires[iaml:name='sync1']");
    assertEquals(1, syncWires.size())// there is only one

    SyncWire wire = (SyncWire) syncWires.get(0);    // get the first one

    // get the referenced operations of sync1
    InputTextField name1 = (InputTextField) queryOne(root, "//iaml.visual:children[iaml:name='name1']");
    InputTextField name2 = (InputTextField) queryOne(root, "//iaml.visual:children[iaml:name='name2']");

    Event name1edit = name1.getOnChange();
    Event name2edit = name2.getOnChange();

    Operation name1update = assertHasOperation(name1, "update");
    Operation name2update = assertHasOperation(name2, "update");

    Value name1value = assertHasFieldValue(name1);
    Value name2value = assertHasFieldValue(name2);

    // none of these can ever be null because queryOne() also calls assert(size>1)

    // this wire should contain at least 4 wires
    /*
     *   [name1]         [name2]
     *  edit ------------> update
     *  update <---------- edit
     *
     * + ActivityParameter wires for both
     */
    //assertGreaterEq(4, wire.getWires().size());

    // run instance wires
    ECARule name1editRun = null;
    ECARule name2editRun = null;
    Parameter name1editParam = null;
    Parameter name2editParam = null;
    // get RunActions first
    for (ECARule w : wire.getEcaRules()) {
      if (w.getTrigger().equals(name1edit) && w.getTarget().equals(name2update) )
        name1editRun = w;
      if (w.getTrigger().equals(name2edit) && w.getTarget().equals(name1update) )
        name2editRun = w;
    }
    // then ParameterWires
    for (Parameter w : wire.getParameterEdges()) {
      if (w.getParameterValue().equals(name1value) && w.getParameterTerm().equals(name1editRun) )
        name1editParam = w;
      if (w.getParameterValue().equals(name2value) && w.getParameterTerm().equals(name2editRun) )
        name2editParam = w;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.