@Test public void newMessagesArePushedThenSet() { Message message = new Message(anotherUser, "another message"); firebaseChatDatabase.sendMessage(channel, message); verify(mockMessagesDatabase).push(); verify(mockMessagesDatabase).setValue(message); }
@Override public void sendMessage(Channel channel, Message message) { messagesInChannel(channel).push().setValue(message); }
FirebaseChatDatabase implements ChatDatabase { @Override public void sendMessage(Channel channel, Message message) { messagesInChannel(channel).push().setValue(message); } }
FirebaseChatDatabase implements ChatDatabase { @Override public void sendMessage(Channel channel, Message message) { messagesInChannel(channel).push().setValue(message); } FirebaseChatDatabase(FirebaseDatabase firebaseDatabase, FirebaseObservableListeners firebaseObservableListeners); }
FirebaseChatDatabase implements ChatDatabase { @Override public void sendMessage(Channel channel, Message message) { messagesInChannel(channel).push().setValue(message); } FirebaseChatDatabase(FirebaseDatabase firebaseDatabase, FirebaseObservableListeners firebaseObservableListeners); @Override Observable<Chat> observeChat(Channel channel); @Override void sendMessage(Channel channel, Message message); }
FirebaseChatDatabase implements ChatDatabase { @Override public void sendMessage(Channel channel, Message message) { messagesInChannel(channel).push().setValue(message); } FirebaseChatDatabase(FirebaseDatabase firebaseDatabase, FirebaseObservableListeners firebaseObservableListeners); @Override Observable<Chat> observeChat(Channel channel); @Override void sendMessage(Channel channel, Message message);  }