コード例 #1
0
        public void TestNoIrssiCompletionAcrossChats()
        {
            cv.ID = "#athens";
            cv.AddParticipant("Hippolyta");
            cv.AddParticipant("Hermia");
            cv.AddParticipant("Helena");

            string inputLine = "H";
            int    curPos    = 1;

            tcnc.Complete(ref inputLine, ref curPos, cv);

            AssertNoMessagesOutput();
            Assert.AreEqual("Helena: ", inputLine);
            Assert.AreEqual(8, curPos);

            // simulate switching chats
            var elsinoreCV = new MockChatView();

            elsinoreCV.ID = "#elsinore";
            elsinoreCV.AddParticipant("Hamlet");
            elsinoreCV.AddParticipant("HamletSr|Ghost");

            tcnc.Complete(ref inputLine, ref curPos, elsinoreCV);

            AssertNoMessagesOutput();
            Assert.AreEqual("Helena: ", inputLine);
            Assert.AreEqual(8, curPos);
        }
コード例 #2
0
        public void Prepare()
        {
            lpnc = new LongestPrefixNickCompleter();
            lpnc.CompletionChar = ":";

            tcnc = new TabCycleNickCompleter();
            tcnc.CompletionChar = ":";

            cv = new MockChatView();
        }
コード例 #3
0
ファイル: NickCompleterTests.cs プロジェクト: glwu/smuxi
        public void Prepare()
        {
            lpnc = new LongestPrefixNickCompleter();
            lpnc.CompletionChar = ":";

            tcnc = new TabCycleNickCompleter();
            tcnc.CompletionChar = ":";

            cv = new MockChatView();
        }
コード例 #4
0
ファイル: NickCompleterTests.cs プロジェクト: pacificIT/smuxi
        public void TestNoIrssiCompletionAcrossChats()
        {
            cv.ID = "#athens";
            cv.AddParticipant("Hippolyta");
            cv.AddParticipant("Hermia");
            cv.AddParticipant("Helena");

            string inputLine = "H";
            int curPos = 1;

            tcnc.Complete(ref inputLine, ref curPos, cv);

            AssertNoMessagesOutput();
            Assert.AreEqual("Helena: ", inputLine);
            Assert.AreEqual(8, curPos);

            // simulate switching chats
            var elsinoreCV = new MockChatView();
            elsinoreCV.ID = "#elsinore";
            elsinoreCV.AddParticipant("Hamlet");
            elsinoreCV.AddParticipant("HamletSr|Ghost");

            tcnc.Complete(ref inputLine, ref curPos, elsinoreCV);

            AssertNoMessagesOutput();
            Assert.AreEqual("Helena: ", inputLine);
            Assert.AreEqual(8, curPos);
        }