messagesCollection.drop();
}
public void insert10Messages() {
MessagesHistoryMongo conect = new MessagesHistoryMongo();
Statut statut = Statut.EN_LIGNE;
Message message1 = new Message();
message1.setMessage("comment vas-tu?");
message1.setUserFrom(new User("benoit", statut, "192.168.1.1"));
message1.setUserTo("florian");
message1.setEvent(Event.ALL_CLIENTS);
message1.setDate(new Date(1394743482).toString());
conect.saveMessage(message1);
Statut statut2 = Statut.ABSENT;
Message message2 = new Message();
message2.setMessage("bien et toi");
message2.setUserFrom(new User("florian", statut2, "192.168.1.2"));
message2.setUserTo("Benoit");
message2.setEvent(Event.ONE_CLIENT);