From bebc1bc6f0f41a2256aae8522edf0b1a151195e0 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Fri, 25 Mar 2022 15:11:48 -0400 Subject: [PATCH] fix test namespaces --- IRCSharp.Tests/State/Cap.cs | 21 ++++++++++--------- IRCSharp.Tests/State/Casemap.cs | 5 +++-- IRCSharp.Tests/State/Channel.cs | 4 ++-- IRCSharp.Tests/State/Emit.cs | 3 ++- IRCSharp.Tests/State/ISupport.cs | 3 ++- IRCSharp.Tests/State/Mode.cs | 3 ++- IRCSharp.Tests/State/Motd.cs | 3 ++- IRCSharp.Tests/State/Sasl.cs | 5 +++-- IRCSharp.Tests/State/User.cs | 5 +++-- IRCSharp.Tests/State/Who.cs | 5 +++-- IRCSharp.Tests/Tokenization/Data/JoinModel.cs | 2 +- .../Tokenization/Data/SplitModel.cs | 2 +- IRCSharp.Tests/Tokenization/Format.cs | 3 ++- IRCSharp.Tests/Tokenization/Hostmask.cs | 5 +++-- IRCSharp.Tests/Tokenization/Parser.cs | 5 +++-- .../Tokenization/StatefulDecoder.cs | 3 ++- .../Tokenization/StatefulEncoder.cs | 3 ++- IRCSharp.Tests/Tokenization/Tokenization.cs | 3 ++- 18 files changed, 49 insertions(+), 34 deletions(-) diff --git a/IRCSharp.Tests/State/Cap.cs b/IRCSharp.Tests/State/Cap.cs index 3c0faba..ea2c718 100644 --- a/IRCSharp.Tests/State/Cap.cs +++ b/IRCSharp.Tests/State/Cap.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; +using IRCStates; using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class Cap @@ -25,7 +26,7 @@ namespace IRCStates.Tests } [TestMethod] - public void LSTwoLines() + public void LsTwoLines() { _server.Parse(new Line("CAP * LS * :a b")); CollectionAssert.AreEqual(new Dictionary(), _server.AvailableCaps); @@ -36,7 +37,7 @@ namespace IRCStates.Tests } [TestMethod] - public void LSValues() + public void LsValues() { _server.Parse(new Line("CAP * LS :a b= c=1")); CollectionAssert.AreEqual(new Dictionary {{"a", ""}, {"b", ""}, {"c", "1"}}, @@ -61,7 +62,7 @@ namespace IRCStates.Tests } [TestMethod] - public void ACKNotLS() + public void ACKNotLs() { _server.Parse(new Line("CAP * LS a")); _server.Parse(new Line("CAP * ACK b")); @@ -69,14 +70,14 @@ namespace IRCStates.Tests } [TestMethod] - public void NEWNoLS() + public void NewNoLs() { _server.Parse(new Line("CAP * NEW :a")); CollectionAssert.AreEqual(new Dictionary {{"a", ""}}, _server.AvailableCaps); } [TestMethod] - public void NEWOneLine() + public void NewOneLine() { _server.Parse(new Line("CAP * LS :a")); _server.Parse(new Line("CAP * NEW :b")); @@ -84,7 +85,7 @@ namespace IRCStates.Tests } [TestMethod] - public void NEWTwoLines() + public void NewTwoLines() { _server.Parse(new Line("CAP * LS :a")); _server.Parse(new Line("CAP * NEW :b c")); @@ -93,7 +94,7 @@ namespace IRCStates.Tests } [TestMethod] - public void DELNotAcked() + public void DelNotAcked() { _server.Parse(new Line("CAP * DEL a")); } @@ -109,7 +110,7 @@ namespace IRCStates.Tests } [TestMethod] - public void DELTwoLS() + public void DelTwoLs() { _server.Parse(new Line("CAP * LS :a b")); _server.Parse(new Line("CAP * ACK :a b")); @@ -119,7 +120,7 @@ namespace IRCStates.Tests } [TestMethod] - public void DELTwoDEL() + public void DelTwoDel() { _server.Parse(new Line("CAP * LS :a b")); _server.Parse(new Line("CAP * ACK :a b")); diff --git a/IRCSharp.Tests/State/Casemap.cs b/IRCSharp.Tests/State/Casemap.cs index 4a02444..29b84d6 100644 --- a/IRCSharp.Tests/State/Casemap.cs +++ b/IRCSharp.Tests/State/Casemap.cs @@ -1,7 +1,8 @@ -using IRCTokens; +using IRCStates; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class Casemap diff --git a/IRCSharp.Tests/State/Channel.cs b/IRCSharp.Tests/State/Channel.cs index 6868e0f..10d8a57 100644 --- a/IRCSharp.Tests/State/Channel.cs +++ b/IRCSharp.Tests/State/Channel.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; +using IRCStates; using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class Channel @@ -30,7 +31,6 @@ namespace IRCStates.Tests var user = _server.Users["nickname"]; var chan = _server.Channels["#chan"]; Assert.IsTrue(chan.Users.ContainsKey(user.NickNameLower)); - var chanUser = chan.Users[user.NickNameLower]; CollectionAssert.AreEqual(new List {chan.NameLower}, user.Channels.ToList()); } diff --git a/IRCSharp.Tests/State/Emit.cs b/IRCSharp.Tests/State/Emit.cs index 07fea8c..2b4d559 100644 --- a/IRCSharp.Tests/State/Emit.cs +++ b/IRCSharp.Tests/State/Emit.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; +using IRCStates; using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class Emit diff --git a/IRCSharp.Tests/State/ISupport.cs b/IRCSharp.Tests/State/ISupport.cs index 5cdcc61..a25cba8 100644 --- a/IRCSharp.Tests/State/ISupport.cs +++ b/IRCSharp.Tests/State/ISupport.cs @@ -1,10 +1,11 @@ using System.Collections.Generic; +using IRCStates; using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; // ReSharper disable InconsistentNaming -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class ISupport diff --git a/IRCSharp.Tests/State/Mode.cs b/IRCSharp.Tests/State/Mode.cs index 90763fa..79b8dba 100644 --- a/IRCSharp.Tests/State/Mode.cs +++ b/IRCSharp.Tests/State/Mode.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; +using IRCStates; using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class Mode diff --git a/IRCSharp.Tests/State/Motd.cs b/IRCSharp.Tests/State/Motd.cs index 2d75982..3efbce7 100644 --- a/IRCSharp.Tests/State/Motd.cs +++ b/IRCSharp.Tests/State/Motd.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; +using IRCStates; using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class Motd diff --git a/IRCSharp.Tests/State/Sasl.cs b/IRCSharp.Tests/State/Sasl.cs index 151ccdf..3056a58 100644 --- a/IRCSharp.Tests/State/Sasl.cs +++ b/IRCSharp.Tests/State/Sasl.cs @@ -1,7 +1,8 @@ -using IRCTokens; +using IRCStates; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class Sasl diff --git a/IRCSharp.Tests/State/User.cs b/IRCSharp.Tests/State/User.cs index 61d7157..b1c1caf 100644 --- a/IRCSharp.Tests/State/User.cs +++ b/IRCSharp.Tests/State/User.cs @@ -1,7 +1,8 @@ -using IRCTokens; +using IRCStates; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class User diff --git a/IRCSharp.Tests/State/Who.cs b/IRCSharp.Tests/State/Who.cs index d091785..2220b12 100644 --- a/IRCSharp.Tests/State/Who.cs +++ b/IRCSharp.Tests/State/Who.cs @@ -1,7 +1,8 @@ -using IRCTokens; +using IRCStates; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCStates.Tests +namespace IRCSharp.Tests.State { [TestClass] public class Who diff --git a/IRCSharp.Tests/Tokenization/Data/JoinModel.cs b/IRCSharp.Tests/Tokenization/Data/JoinModel.cs index e54f4cf..638ae23 100644 --- a/IRCSharp.Tests/Tokenization/Data/JoinModel.cs +++ b/IRCSharp.Tests/Tokenization/Data/JoinModel.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using YamlDotNet.Serialization; -namespace IRCTokens.Tests.Data +namespace IRCSharp.Tests.Tokenization.Data { public class JoinModel { diff --git a/IRCSharp.Tests/Tokenization/Data/SplitModel.cs b/IRCSharp.Tests/Tokenization/Data/SplitModel.cs index 5386326..1856dd9 100644 --- a/IRCSharp.Tests/Tokenization/Data/SplitModel.cs +++ b/IRCSharp.Tests/Tokenization/Data/SplitModel.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace IRCTokens.Tests.Data +namespace IRCSharp.Tests.Tokenization.Data { public class SplitModel { diff --git a/IRCSharp.Tests/Tokenization/Format.cs b/IRCSharp.Tests/Tokenization/Format.cs index 7224f97..5dc589a 100644 --- a/IRCSharp.Tests/Tokenization/Format.cs +++ b/IRCSharp.Tests/Tokenization/Format.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCTokens.Tests +namespace IRCSharp.Tests.Tokenization { [TestClass] public class Format diff --git a/IRCSharp.Tests/Tokenization/Hostmask.cs b/IRCSharp.Tests/Tokenization/Hostmask.cs index 17c5ad7..a7de338 100644 --- a/IRCSharp.Tests/Tokenization/Hostmask.cs +++ b/IRCSharp.Tests/Tokenization/Hostmask.cs @@ -1,6 +1,7 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; +using IRCTokens; +using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCTokens.Tests +namespace IRCSharp.Tests.Tokenization { [TestClass] public class Hostmask diff --git a/IRCSharp.Tests/Tokenization/Parser.cs b/IRCSharp.Tests/Tokenization/Parser.cs index 40ff803..4f4338b 100644 --- a/IRCSharp.Tests/Tokenization/Parser.cs +++ b/IRCSharp.Tests/Tokenization/Parser.cs @@ -1,12 +1,13 @@ using System.Collections.Generic; using System.Globalization; using System.IO; -using IRCTokens.Tests.Data; +using IRCSharp.Tests.Tokenization.Data; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; -namespace IRCTokens.Tests +namespace IRCSharp.Tests.Tokenization { [TestClass] public class Parser diff --git a/IRCSharp.Tests/Tokenization/StatefulDecoder.cs b/IRCSharp.Tests/Tokenization/StatefulDecoder.cs index 4da7690..7b9992d 100644 --- a/IRCSharp.Tests/Tokenization/StatefulDecoder.cs +++ b/IRCSharp.Tests/Tokenization/StatefulDecoder.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Text; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCTokens.Tests +namespace IRCSharp.Tests.Tokenization { [TestClass] public class StatefulDecoder diff --git a/IRCSharp.Tests/Tokenization/StatefulEncoder.cs b/IRCSharp.Tests/Tokenization/StatefulEncoder.cs index d1e1e3e..50d2bd5 100644 --- a/IRCSharp.Tests/Tokenization/StatefulEncoder.cs +++ b/IRCSharp.Tests/Tokenization/StatefulEncoder.cs @@ -1,7 +1,8 @@ using System.Text; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCTokens.Tests +namespace IRCSharp.Tests.Tokenization { [TestClass] public class StatefulEncoder diff --git a/IRCSharp.Tests/Tokenization/Tokenization.cs b/IRCSharp.Tests/Tokenization/Tokenization.cs index c4c5c5a..b270e4e 100644 --- a/IRCSharp.Tests/Tokenization/Tokenization.cs +++ b/IRCSharp.Tests/Tokenization/Tokenization.cs @@ -1,9 +1,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using IRCTokens; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace IRCTokens.Tests +namespace IRCSharp.Tests.Tokenization { [TestClass] public class Tokenization