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); }
public void Prepare() { lpnc = new LongestPrefixNickCompleter(); lpnc.CompletionChar = ":"; tcnc = new TabCycleNickCompleter(); tcnc.CompletionChar = ":"; cv = new MockChatView(); }