Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        public void Prepare()
        {
            lpnc = new LongestPrefixNickCompleter();
            lpnc.CompletionChar = ":";

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

            cv = new MockChatView();
        }
Ejemplo n.º 3
0
        public void Prepare()
        {
            lpnc = new LongestPrefixNickCompleter();
            lpnc.CompletionChar = ":";

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

            cv = new MockChatView();
        }
Ejemplo n.º 4
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);
        }