public void TestOverlongRange() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "the quick brown fox jumps over the lazy dog"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr/\u1000-\u2000/\u3000-\u4000/"); Assert.Equal(0, mgr.EventLog.Count); }
public void TestInvertedRange() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "the quick brown fox jumps over the lazy dog"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr/z-a/Z-A/"); Assert.Equal(0, mgr.EventLog.Count); }
public void TestRangeTransposition() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "the quick brown fox jumps over the lazy dog"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr_a-z_A-Z_"); Assert.Equal(1, mgr.EventLog.Count); TestMessage sentMessage = Assert.IsType <TestMessage>(mgr.EventLog[0]); Assert.Equal(MessageType.Message, sentMessage.Type); Assert.Equal(TestChannelName, sentMessage.Target); Assert.Equal("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG", sentMessage.Body); }
public void TestDeleteMissingTo() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "the quick brown fox jumps over the lazy dog"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr/aeiouy//d"); Assert.Equal(1, mgr.EventLog.Count); TestMessage sentMessage = Assert.IsType <TestMessage>(mgr.EventLog[0]); Assert.Equal(MessageType.Message, sentMessage.Type); Assert.Equal(TestChannelName, sentMessage.Target); Assert.Equal("th qck brwn fx jmps vr th lz dg", sentMessage.Body); }
public void TestRepeatLastTo() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "the quick brown fox jumps over the lazy dog"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr/aeiouy/q/r"); Assert.Equal(1, mgr.EventLog.Count); TestMessage sentMessage = Assert.IsType <TestMessage>(mgr.EventLog[0]); Assert.Equal(MessageType.Message, sentMessage.Type); Assert.Equal(TestChannelName, sentMessage.Target); Assert.Equal("thq qqqck brqwn fqx jqmps qvqr thq lqzq dqg", sentMessage.Body); }
public void TestEmoji() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "lol X"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr/X/\U0001F600/"); Assert.Equal(1, mgr.EventLog.Count); TestMessage sentMessage = Assert.IsType <TestMessage>(mgr.EventLog[0]); Assert.Equal(MessageType.Message, sentMessage.Type); Assert.Equal(TestChannelName, sentMessage.Target); Assert.Equal("lol \U0001F600", sentMessage.Body); }
public void TestNonRangeHyphen2() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "twenty-three thousand four hundred fifty-six"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr/a-d-/A-D|/"); Assert.Equal(1, mgr.EventLog.Count); TestMessage sentMessage = Assert.IsType <TestMessage>(mgr.EventLog[0]); Assert.Equal(MessageType.Message, sentMessage.Type); Assert.Equal(TestChannelName, sentMessage.Target); Assert.Equal("twenty|three thousAnD four hunDreD fifty|six", sentMessage.Body); }
public void TestMultipleTranspositions() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "a one, a two, a three, a four"); mgr.InjectChannelMessage(TestChannelName, "YetAnotherUser", " tr/a/e/ tr_o_u_ "); Assert.Equal(1, mgr.EventLog.Count); TestMessage sentMessage = Assert.IsType <TestMessage>(mgr.EventLog[0]); Assert.Equal(MessageType.Message, sentMessage.Type); Assert.Equal(TestChannelName, sentMessage.Target); Assert.Equal("e une, e twu, e three, e fuur", sentMessage.Body); }
public void TestStringTransposition() { TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "the quick brown fox jumps over the lazy dog"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr/aeiouy/431087/"); Assert.Equal(1, mgr.EventLog.Count); TestMessage sentMessage = Assert.IsType <TestMessage>(mgr.EventLog[0]); Assert.Equal(MessageType.Message, sentMessage.Type); Assert.Equal(TestChannelName, sentMessage.Target); Assert.Equal("th3 q81ck br0wn f0x j8mps 0v3r th3 l4z7 d0g", sentMessage.Body); }
public void TestGermanPangram() { // (I know that the capitalization of sharp S is currently not considered correct) TestConnectionManager mgr = TestCommon.ObtainConnectionManager(); mgr.InjectChannelMessage(TestChannelName, "OneUser", "zwölf boxkämpfer jagen viktor quer über den großen sylter deich"); mgr.InjectChannelMessage(TestChannelName, "AnotherUser", "tr/a-zäöüß/A-ZÄÖÜẞ/"); Assert.Equal(1, mgr.EventLog.Count); TestMessage sentMessage = Assert.IsType <TestMessage>(mgr.EventLog[0]); Assert.Equal(MessageType.Message, sentMessage.Type); Assert.Equal(TestChannelName, sentMessage.Target); Assert.Equal("ZWÖLF BOXKÄMPFER JAGEN VIKTOR QUER ÜBER DEN GROẞEN SYLTER DEICH", sentMessage.Body); }