@Test public void showsMessagesOfCurrentConversation() throws Exception { clientConfiguration.selectIdentity(i); contactRepository.save(c, i); controller.sendDropMessage(c, "you won't see this"); receiveMessageFromC(); runLaterAndWait(() -> {}); assertEquals(2, controller.messages.getChildren().size()); }
void sendDropMessage(Contact c, String text) throws QblDropPayloadSizeException, QblNetworkInvalidResponseException, PersistenceException { text = EmojiParser.parseToUnicode(text); DropMessage d = new DropMessage(identity, new TextMessage(text).toJson(), DropMessageRepository.PAYLOAD_TYPE_MESSAGE); d.setDropMessageMetadata(new DropMessageMetadata(identity)); dropConnector.send(c, d); dropMessageRepository.addMessage(d, identity, c, true); }
ActionlogController extends AbstractController implements Initializable, Observer { void sendDropMessage(Contact c, String text) throws QblDropPayloadSizeException, QblNetworkInvalidResponseException, PersistenceException { text = EmojiParser.parseToUnicode(text); DropMessage d = new DropMessage(identity, new TextMessage(text).toJson(), DropMessageRepository.PAYLOAD_TYPE_MESSAGE); d.setDropMessageMetadata(new DropMessageMetadata(identity)); dropConnector.send(c, d); dropMessageRepository.addMessage(d, identity, c, true); } }
ActionlogController extends AbstractController implements Initializable, Observer { void sendDropMessage(Contact c, String text) throws QblDropPayloadSizeException, QblNetworkInvalidResponseException, PersistenceException { text = EmojiParser.parseToUnicode(text); DropMessage d = new DropMessage(identity, new TextMessage(text).toJson(), DropMessageRepository.PAYLOAD_TYPE_MESSAGE); d.setDropMessageMetadata(new DropMessageMetadata(identity)); dropConnector.send(c, d); dropMessageRepository.addMessage(d, identity, c, true); }  }
ActionlogController extends AbstractController implements Initializable, Observer { void sendDropMessage(Contact c, String text) throws QblDropPayloadSizeException, QblNetworkInvalidResponseException, PersistenceException { text = EmojiParser.parseToUnicode(text); DropMessage d = new DropMessage(identity, new TextMessage(text).toJson(), DropMessageRepository.PAYLOAD_TYPE_MESSAGE); d.setDropMessageMetadata(new DropMessageMetadata(identity)); dropConnector.send(c, d); dropMessageRepository.addMessage(d, identity, c, true); }  @Override void initialize(URL location, ResourceBundle resources); List<PersistenceDropMessage> getReceivedDropMessages(); @Override synchronized void update(Observable o, Object arg); synchronized void setContact(Contact contact); void handleAccept(); void handleIgnore(); void selectEmoji(); }
ActionlogController extends AbstractController implements Initializable, Observer { void sendDropMessage(Contact c, String text) throws QblDropPayloadSizeException, QblNetworkInvalidResponseException, PersistenceException { text = EmojiParser.parseToUnicode(text); DropMessage d = new DropMessage(identity, new TextMessage(text).toJson(), DropMessageRepository.PAYLOAD_TYPE_MESSAGE); d.setDropMessageMetadata(new DropMessageMetadata(identity)); dropConnector.send(c, d); dropMessageRepository.addMessage(d, identity, c, true); }  @Override void initialize(URL location, ResourceBundle resources); List<PersistenceDropMessage> getReceivedDropMessages(); @Override synchronized void update(Observable o, Object arg); synchronized void setContact(Contact contact); void handleAccept(); void handleIgnore(); void selectEmoji(); @FXML
    public BorderPane chat; @FXML
    public ImageView emojiSelector; }