Package rabbit.data.store.model

Examples of rabbit.data.store.model.CommandEvent


                                  DataStore.COMMAND_STORE);
  }

  @Override
  protected CommandEvent createEvent(DateTime dateTime) {
    return new CommandEvent(dateTime, createExecutionEvent("adnk2o385"));
  }
View Full Code Here


    return new CommandEvent(dateTime, createExecutionEvent("adnk2o385"));
  }

  @Override
  protected CommandEvent createEventDiff(DateTime dateTime) {
    return new CommandEvent(dateTime, createExecutionEvent("23545656"));
  }
View Full Code Here

    getHandlerService().activateHandler(command.getId(), createHandler());
    getHandlerService().executeCommand(command.getId(), null);
    long end = System.currentTimeMillis();

    assertEquals(1, tracker.getData().size());
    CommandEvent e = tracker.getData().iterator().next();
    assertEquals(command, e.getExecutionEvent().getCommand());
    assertTrue(start <= e.getTime().getMillis());
    assertTrue(end >= e.getTime().getMillis());
  }
View Full Code Here

    assertEquals(0, tracker.getData().size());
  }

  @Override
  protected CommandEvent createEvent() {
    return new CommandEvent(new DateTime(), createExecutionEvent("1"));
  }
View Full Code Here

    return new CommandEventConverter();
  }

  @Override
  public void testConvert() throws Exception {
    CommandEvent event = createEvent();
    CommandEventType type = converter.convert(event);
    assertEquals(event.getExecutionEvent().getCommand().getId(),
        type.getCommandId());
    assertEquals(1, type.getCount());
  }
View Full Code Here

        type.getCommandId());
    assertEquals(1, type.getCount());
  }

  private CommandEvent createEvent() {
    return new CommandEvent(new DateTime(), createExecutionEvent("adnk2o385"));
  }
View Full Code Here

  }

  @Override
  public void postExecuteSuccess(String commandId, Object returnValue) {
    if (lastEvent != null && lastEvent.getCommand().getId().equals(commandId)) {
      addData(new CommandEvent(new DateTime(), lastEvent));
    }
  }
View Full Code Here

  @Before
  public void setUp() {
    exe = new ExecutionEvent(getCommandService().getCommand("something"),
        Collections.EMPTY_MAP, null, null);
    event = new CommandEvent(new DateTime(), exe);
  }
View Full Code Here

    assertNotNull(event);
  }

  @Test(expected = NullPointerException.class)
  public void testConstructor_withNull() {
    new CommandEvent(new DateTime(), null);
  }
View Full Code Here

    assertSame(exe, event.getExecutionEvent());
  }

  @Override
  protected CommandEvent createEvent(DateTime time) {
    return new CommandEvent(time, new ExecutionEvent(getCommandService()
        .getCommand("something"), Collections.EMPTY_MAP, null, null));
  }
View Full Code Here

TOP

Related Classes of rabbit.data.store.model.CommandEvent

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.