/* * send message and update message history on click */ private void SendChatBtn_Click(object sender, RoutedEventArgs e) { ChatMessage sentMessage = SendButton.SendClicked(InputBox, chatMessages); if (sentMessage.Message != null && connected) { chatListBox.NewOutgoingChatMessage(sentMessage, chatMessages, CLP); } }
public void SendClickedTest() { TextBox tb = new TextBox(); tb.Text = "Some test input"; ListBox lb = new ListBox(); var output = SendButton.SendClicked(tb, lb); Assert.IsNotNull(output); Assert.IsInstanceOfType(output, typeof(ChatMessage)); }