diff options
author | Ben Harris <ben@tilde.team> | 2020-04-28 00:35:52 -0400 |
---|---|---|
committer | Ben Harris <ben@tilde.team> | 2020-04-28 00:35:52 -0400 |
commit | 80afa2c0aec37b7f98cc22615417c36672e695da (patch) | |
tree | 63ca3e309a5daa5093e54bdfdb493115c7a3d942 /IrcTokens/Tests/Parser.cs | |
parent | 933a4f85604e21445c9bac8272d64cf3e6f65e00 (diff) |
tidy up, work on stateful
Diffstat (limited to 'IrcTokens/Tests/Parser.cs')
-rw-r--r-- | IrcTokens/Tests/Parser.cs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/IrcTokens/Tests/Parser.cs b/IrcTokens/Tests/Parser.cs index df70b92..ed4e406 100644 --- a/IrcTokens/Tests/Parser.cs +++ b/IrcTokens/Tests/Parser.cs @@ -1,8 +1,8 @@ -using IrcTokens.Tests.Data; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.Collections.Generic; +using System.Collections.Generic; using System.Globalization; using System.IO; +using IrcTokens.Tests.Data; +using Microsoft.VisualStudio.TestTools.UnitTesting; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; @@ -26,13 +26,14 @@ namespace IrcTokens.Tests foreach (var test in LoadYaml<SplitModel>("Tests/Data/msg-split.yaml").Tests) { var tokens = new Line(test.Input); - var atoms = test.Atoms; + var atoms = test.Atoms; Assert.AreEqual(atoms.Verb.ToUpper(CultureInfo.InvariantCulture), tokens.Command, $"command failed on: '{test.Input}'"); Assert.AreEqual(atoms.Source, tokens.Source, $"source failed on: '{test.Input}'"); CollectionAssert.AreEqual(atoms.Tags, tokens.Tags, $"tags failed on: '{test.Input}'"); - CollectionAssert.AreEqual(atoms.Params ?? new List<string>(), tokens.Params, $"params failed on: '{test.Input}'"); + CollectionAssert.AreEqual(atoms.Params ?? new List<string>(), tokens.Params, + $"params failed on: '{test.Input}'"); } } @@ -44,10 +45,7 @@ namespace IrcTokens.Tests var atoms = test.Atoms; var line = new Line { - Command = atoms.Verb, - Params = atoms.Params, - Source = atoms.Source, - Tags = atoms.Tags + Command = atoms.Verb, Params = atoms.Params, Source = atoms.Source, Tags = atoms.Tags }.Format(); Assert.IsTrue(test.Matches.Contains(line), test.Description); |