diff options
Diffstat (limited to 'IrcTokens/Tests')
-rw-r--r-- | IrcTokens/Tests/StatefulDecoder.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/IrcTokens/Tests/StatefulDecoder.cs b/IrcTokens/Tests/StatefulDecoder.cs index da4009e..c5728a5 100644 --- a/IrcTokens/Tests/StatefulDecoder.cs +++ b/IrcTokens/Tests/StatefulDecoder.cs @@ -45,7 +45,8 @@ namespace IrcTokens.Tests { var iso8859 = Encoding.GetEncoding("iso-8859-1"); _decoder = new IrcTokens.StatefulDecoder {Encoding = iso8859}; - var lines = _decoder.Push(iso8859.GetBytes("PRIVMSG #channel :hello Ç\r\n")); + var bytes = iso8859.GetBytes("PRIVMSG #channel :hello Ç\r\n"); + var lines = _decoder.Push(bytes, bytes.Length); var line = new Line("PRIVMSG #channel :hello Ç"); Assert.IsTrue(line.Equals(lines[0])); } @@ -55,7 +56,8 @@ namespace IrcTokens.Tests { var latin1 = Encoding.GetEncoding("iso-8859-1"); _decoder = new IrcTokens.StatefulDecoder {Encoding = null, Fallback = latin1}; - var lines = _decoder.Push(latin1.GetBytes("PRIVMSG #channel hélló\r\n")); + var bytes = latin1.GetBytes("PRIVMSG #channel hélló\r\n"); + var lines = _decoder.Push(bytes, bytes.Length); Assert.AreEqual(1, lines.Count); Assert.IsTrue(new Line("PRIVMSG #channel hélló").Equals(lines[0])); } |