예제 #1
0
        /*
         * 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);
            }
        }
예제 #2
0
        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));
        }