Package jetbrains.communicator.mock

Examples of jetbrains.communicator.mock.MockMessage


    try {
      logger.setLevel(Level.WARN);

      for (int i = 0; i < 1000; i ++) {
        Date date = new Date(System.currentTimeMillis() + i * 1000L * 3600L);
        myDispatcher.sendNow(myUser, new MockMessage(date));
      }
      Thread.sleep(SAVE_WAIT_TIMEOUT*2);


      WatchDog watchDog = new WatchDog("Load history");
View Full Code Here


      logger.setLevel(oldLevel);
    }
  }

  public void testClearHistory_Persistence() throws Exception {
    myDispatcher.sendNow(myUser, new MockMessage(new Date()));
    Thread.sleep(SAVE_WAIT_TIMEOUT);

    assertFalse(myDispatcher.isHistoryEmpty());

    myDispatcher.clearHistory();
    Thread.sleep(SAVE_WAIT_TIMEOUT);
    assertEquals("History should be deleted", 0, new File(myIdeFacade.getCacheDir(), "history").listFiles().length);

    myDispatcher.sendNow(myUser, new MockMessage(new Date()));
    myDispatcher.clearHistory();
    Thread.sleep(SAVE_WAIT_TIMEOUT);
    assertEquals("History should be deleted", 0, new File(myIdeFacade.getCacheDir(), "history").listFiles().length);

    assertEquals(0, myDispatcher.getHistory(myUser, null).length);
View Full Code Here

TOP

Related Classes of jetbrains.communicator.mock.MockMessage

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.