Package easysm.datatypes.information

Examples of easysm.datatypes.information.EventInfo


  @Test
  public void Main_doAddEvent_OneValidEvent()
  {
    Set<ParameterInfo> params = SetFactory.createSet(ParameterInfo.class);
    EventInfo eInfo = new EventInfo(eIffy, params);
    main.doAddEvent(eInfo);
    List<Event> eSet = main.events().eventList();
    assertTrue(eSet.size() == 2);
    assertTrue(eSet.contains(new Event(eInfo)));
View Full Code Here


  @Test
  public void Main_doAddEvent_WithSameNameOfSO()
  {
    Set<ParameterInfo> params = SetFactory.createSet(ParameterInfo.class);
    main.doAddStateObserver(new StateObserverInfo(ePine, Type.INTEGER, null));
    main.doAddEvent(new EventInfo(ePine, params));
    List<Event> eSet = main.events().eventList();
    assertTrue(eSet.size() == 1);
  }
View Full Code Here

  public void Main_doAddEvent_WithSameNameOfParameters()
  {
    Set<ParameterInfo> params = SetFactory.createSet(ParameterInfo.class);
    params.add(new ParameterInfo(eIffy, Type.INTEGER));
    params.add(new ParameterInfo(eIffy, Type.STRING));
    main.doAddEvent(new EventInfo(ePine, params));
    List<Event> eSet = main.events().eventList();
    assertTrue(eSet.size() == 1);
  }
View Full Code Here

  }

  @Test
  public void Main_doUpdateEvent_OneValidEvent()
  {
    main.doAddEvent(new EventInfo(eIffy, null));
    List<Event> eSet = main.events().eventList();
    Event ev = null;
    for (Event e : eSet) {
      if (e.name().equals(eIffy))
        ev = e;
    }
    EventInfo eInfo = new EventInfo(ePine, null);
    main.doUpdateEvent(ev, eInfo);
    assertTrue(eSet.size() == 2);
    assertTrue(ev.name().equals(ePine));
    assertTrue(ev.parameters().size() == 0);
  }
View Full Code Here

  @Test
  public void Main_doDeleteEvent()
  {
    Set<ParameterInfo> params = SetFactory.createSet(ParameterInfo.class);
    params.add(new ParameterInfo(eIffy, Type.INTEGER));
    main.doAddEvent(new EventInfo(ePine, params));
    List<Event> eSet = main.events().eventList();
    for (Event e : eSet)
      main.doDeleteEvent(e);
    assertTrue(eSet.size() == 1);
  }
View Full Code Here

  @Test
  public void Main_doAddStateObserver_WithSameNameOfEvent()
  {
    Set<ParameterInfo> params = SetFactory.createSet(ParameterInfo.class);
    main.doAddEvent(new EventInfo(soIffy, params));
    main.doAddStateObserver(new StateObserverInfo(soIffy, Type.INTEGER, null));
    List<StateObserver> soSet = main.stateObservers().soList();
    assertTrue(soSet.size() == 1);
  }
View Full Code Here

      jtextfield_name.selectAll();
      jtextfield_name.requestFocus();
      return;
    }

    EventInfo newEventInfo = new EventInfo(name, parametersOfEvent);

    if (eventToMod == null)
      updateEvents.addEvent(newEventInfo);
    else
      updateEvents.updateEvent(eventToMod, newEventInfo);
View Full Code Here

TOP

Related Classes of easysm.datatypes.information.EventInfo

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.