about summary refs log tree commit diff
path: root/IrcTokens/Tests/Format.cs
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2020-05-14 23:06:10 -0400
committerBen Harris <ben@tilde.team>2020-05-14 23:17:47 -0400
commit21f1e95fb8e935134a969bc3d729964d8d2aadfa (patch)
treedb2be27e9b5ac48e19f92b56cbad68ab59f7099e /IrcTokens/Tests/Format.cs
parent304df7805b9925c2edd992fd4177eef80197f807 (diff)
rename Irc to IRC
Diffstat (limited to 'IrcTokens/Tests/Format.cs')
-rw-r--r--IrcTokens/Tests/Format.cs105
1 files changed, 0 insertions, 105 deletions
diff --git a/IrcTokens/Tests/Format.cs b/IrcTokens/Tests/Format.cs
deleted file mode 100644
index 69a5682..0000000
--- a/IrcTokens/Tests/Format.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace IrcTokens.Tests
-{
-    [TestClass]
-    public class Format
-    {
-        [TestMethod]
-        public void TestTags()
-        {
-            var line = new Line("PRIVMSG", "#channel", "hello")
-            {
-                Tags = new Dictionary<string, string> {{"id", "\\" + " " + ";" + "\r\n"}}
-            }.Format();
-
-            Assert.AreEqual("@id=\\\\\\s\\:\\r\\n PRIVMSG #channel hello", line);
-        }
-
-        [TestMethod]
-        public void TestMissingTag()
-        {
-            var line = new Line("PRIVMSG", "#channel", "hello").Format();
-
-            Assert.AreEqual("PRIVMSG #channel hello", line);
-        }
-
-        [TestMethod]
-        public void TestNullTag()
-        {
-            var line = new Line("PRIVMSG", "#channel", "hello") {Tags = new Dictionary<string, string> {{"a", null}}}
-                .Format();
-
-            Assert.AreEqual("@a PRIVMSG #channel hello", line);
-        }
-
-        [TestMethod]
-        public void TestEmptyTag()
-        {
-            var line = new Line("PRIVMSG", "#channel", "hello") {Tags = new Dictionary<string, string> {{"a", ""}}}
-                .Format();
-
-            Assert.AreEqual("@a PRIVMSG #channel hello", line);
-        }
-
-        [TestMethod]
-        public void TestSource()
-        {
-            var line = new Line("PRIVMSG", "#channel", "hello") {Source = "nick!user@host"}.Format();
-
-            Assert.AreEqual(":nick!user@host PRIVMSG #channel hello", line);
-        }
-
-        [TestMethod]
-        public void TestCommandLowercase()
-        {
-            var line = new Line {Command = "privmsg"}.Format();
-            Assert.AreEqual("privmsg", line);
-        }
-
-        [TestMethod]
-        public void TestCommandUppercase()
-        {
-            var line = new Line {Command = "PRIVMSG"}.Format();
-            Assert.AreEqual("PRIVMSG", line);
-        }
-
-        [TestMethod]
-        public void TestTrailingSpace()
-        {
-            var line = new Line("PRIVMSG", "#channel", "hello world").Format();
-
-            Assert.AreEqual("PRIVMSG #channel :hello world", line);
-        }
-
-        [TestMethod]
-        public void TestTrailingNoSpace()
-        {
-            var line = new Line("PRIVMSG", "#channel", "helloworld").Format();
-
-            Assert.AreEqual("PRIVMSG #channel helloworld", line);
-        }
-
-        [TestMethod]
-        public void TestTrailingDoubleColon()
-        {
-            var line = new Line("PRIVMSG", "#channel", ":helloworld").Format();
-
-            Assert.AreEqual("PRIVMSG #channel ::helloworld", line);
-        }
-
-        [TestMethod]
-        public void TestInvalidNonLastSpace()
-        {
-            Assert.ThrowsException<ArgumentException>(() => { new Line("USER", "user", "0 *", "real name").Format(); });
-        }
-
-        [TestMethod]
-        public void TestInvalidNonLastColon()
-        {
-            Assert.ThrowsException<ArgumentException>(() => { new Line("PRIVMSG", ":#channel", "hello").Format(); });
-        }
-    }
-}