Skip to content

Commit

Permalink
Updated nuget packages
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswalpen committed Dec 4, 2023
1 parent 990a094 commit 40a9dc9
Show file tree
Hide file tree
Showing 32 changed files with 251 additions and 219 deletions.
10 changes: 5 additions & 5 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ class Build : NukeBuild
AbsolutePath DeployPath => (AbsolutePath)"C:" / "Projects" / "NuGet Store";

[Parameter("Version to be injected in the Build")]
public string Version { get; set; } = $"1.2.5";
public string Version { get; set; } = $"1.3.1";

[Parameter("The Buildnumber provided by the CI")]
public int BuildNo = 10;
public int BuildNo = 1;

[Parameter("Is RC Version")]
public bool IsRc = false;
Expand All @@ -53,9 +53,9 @@ class Build : NukeBuild
.Before(Restore)
.Executes(() =>
{
SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(DeleteDirectory);
TestsDirectory.GlobDirectories("**/bin", "**/obj").ForEach(DeleteDirectory);
EnsureCleanDirectory(ArtifactsDirectory);
SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(f => f.DeleteDirectory());
TestsDirectory.GlobDirectories("**/bin", "**/obj").ForEach(f => f.DeleteDirectory());
ArtifactsDirectory.CreateOrCleanDirectory();
});

Target Restore => _ => _
Expand Down
2 changes: 1 addition & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="6.3.0" />
<PackageReference Include="Nuke.Common" Version="7.0.6" />
</ItemGroup>

</Project>
17 changes: 9 additions & 8 deletions src/Tests/YamlMap.Tests/ArrayParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace YamlMap.Tests
{
Expand All @@ -20,10 +21,10 @@ public void Parser_BracketArray()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Ids"][0]).Value);
Assert.AreEqual("2", ((ValueToken)result["Ids"][1]).Value);
Assert.AreEqual("3", ((ValueToken)result["Ids"][2]).Value);
Assert.AreEqual("4", ((ValueToken)result["Ids"][3]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Ids"][0]).Value);
ClassicAssert.AreEqual("2", ((ValueToken)result["Ids"][1]).Value);
ClassicAssert.AreEqual("3", ((ValueToken)result["Ids"][2]).Value);
ClassicAssert.AreEqual("4", ((ValueToken)result["Ids"][3]).Value);
}

[Test]
Expand All @@ -39,10 +40,10 @@ public void Parser_BracketArray_Multiline()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Ids"][0]).Value);
Assert.AreEqual("2", ((ValueToken)result["Ids"][1]).Value);
Assert.AreEqual("3", ((ValueToken)result["Ids"][2]).Value);
Assert.AreEqual("4", ((ValueToken)result["Ids"][3]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Ids"][0]).Value);
ClassicAssert.AreEqual("2", ((ValueToken)result["Ids"][1]).Value);
ClassicAssert.AreEqual("3", ((ValueToken)result["Ids"][2]).Value);
ClassicAssert.AreEqual("4", ((ValueToken)result["Ids"][3]).Value);
}
}
}
2 changes: 1 addition & 1 deletion src/Tests/YamlMap.Tests/Integration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void LoadDataFromFile()
var reader = new YamlFileReader();
var users = reader.Read<List<User>>(path);

Assert.IsTrue(users.Count == 3);
Assert.That(users.Count == 3);

}

Expand Down
81 changes: 41 additions & 40 deletions src/Tests/YamlMap.Tests/ParserTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace YamlMap.Tests
{
Expand Down Expand Up @@ -35,16 +36,16 @@ public void WickeFlame_Yaml_Parser()

var result = parser.Parse();

Assert.AreEqual("second", ((ValueToken)result["Root"][0]["L1"]["Name"]).Value);
Assert.AreEqual("third", ((ValueToken)result["Root"][0]["L1"]["L2"]["Name"]).Value);
Assert.AreEqual("first", ((ValueToken)result["Root"][0]["Name"]).Value);
Assert.AreEqual("one", ((ValueToken)result["Alternating"]).Value);
Assert.AreEqual("Succeeded", ((ValueToken)result["Test"]["Outcome"]).Value);
Assert.AreEqual("Succeeded message", ((ValueToken)result["Test"]["Message"]).Value);
Assert.AreEqual("one", ((ValueToken)result["List"][0]).Value);
Assert.AreEqual("two", ((ValueToken)result["List"][1]).Value);
Assert.AreEqual("three", ((ValueToken)result["List"][2]).Value);
Assert.AreEqual("three", ((ValueToken)result["List"][3]).Value);
ClassicAssert.AreEqual("second", ((ValueToken)result["Root"][0]["L1"]["Name"]).Value);
ClassicAssert.AreEqual("third", ((ValueToken)result["Root"][0]["L1"]["L2"]["Name"]).Value);
ClassicAssert.AreEqual("first", ((ValueToken)result["Root"][0]["Name"]).Value);
ClassicAssert.AreEqual("one", ((ValueToken)result["Alternating"]).Value);
ClassicAssert.AreEqual("Succeeded", ((ValueToken)result["Test"]["Outcome"]).Value);
ClassicAssert.AreEqual("Succeeded message", ((ValueToken)result["Test"]["Message"]).Value);
ClassicAssert.AreEqual("one", ((ValueToken)result["List"][0]).Value);
ClassicAssert.AreEqual("two", ((ValueToken)result["List"][1]).Value);
ClassicAssert.AreEqual("three", ((ValueToken)result["List"][2]).Value);
ClassicAssert.AreEqual("three", ((ValueToken)result["List"][3]).Value);
}

[Test]
Expand All @@ -59,7 +60,7 @@ public void WickeFlame_Yaml_Parser_Simple()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Id"]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Id"]).Value);
}

[Test]
Expand All @@ -75,7 +76,7 @@ public void WickeFlame_Yaml_Parser_Nesting()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Child"]["Id"]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Child"]["Id"]).Value);
}

[Test]
Expand All @@ -93,8 +94,8 @@ public void WickeFlame_Yaml_Parser_ExtendedNesting()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Child"]["Id"]).Value);
Assert.AreEqual("2", ((ValueToken)result["Child"]["SubChild"]["Id"]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Child"]["Id"]).Value);
ClassicAssert.AreEqual("2", ((ValueToken)result["Child"]["SubChild"]["Id"]).Value);
}

[Test]
Expand All @@ -115,9 +116,9 @@ public void WickeFlame_Yaml_Parser_MultipleExtendedNesting()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Child"]["Id"]).Value);
Assert.AreEqual("test", ((ValueToken)result["Child"]["Name"]).Value);
Assert.AreEqual("2", ((ValueToken)result["Child2"]["Id"]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Child"]["Id"]).Value);
ClassicAssert.AreEqual("test", ((ValueToken)result["Child"]["Name"]).Value);
ClassicAssert.AreEqual("2", ((ValueToken)result["Child2"]["Id"]).Value);
}

[Test]
Expand All @@ -135,8 +136,8 @@ public void WickeFlame_Yaml_Parser_IntIndexer()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result[0][0]).Value);
Assert.AreEqual("2", ((ValueToken)result[0][1][0]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result[0][0]).Value);
ClassicAssert.AreEqual("2", ((ValueToken)result[0][1][0]).Value);
}

[Test]
Expand All @@ -153,8 +154,8 @@ public void WickeFlame_Yaml_Parser_SimpleList()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Children"][0]).Value);
Assert.AreEqual("2", ((ValueToken)result["Children"][1]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Children"][0]).Value);
ClassicAssert.AreEqual("2", ((ValueToken)result["Children"][1]).Value);
}

[Test]
Expand All @@ -173,10 +174,10 @@ public void WickeFlame_Yaml_Parser_ObjectList()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Children"][0]["Id"]).Value);
Assert.AreEqual("One", ((ValueToken)result["Children"][0]["Name"]).Value);
Assert.AreEqual("2", ((ValueToken)result["Children"][1]["Id"]).Value);
Assert.AreEqual("Two", ((ValueToken)result["Children"][1]["Name"]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Children"][0]["Id"]).Value);
ClassicAssert.AreEqual("One", ((ValueToken)result["Children"][0]["Name"]).Value);
ClassicAssert.AreEqual("2", ((ValueToken)result["Children"][1]["Id"]).Value);
ClassicAssert.AreEqual("Two", ((ValueToken)result["Children"][1]["Name"]).Value);
}

[Test]
Expand All @@ -193,8 +194,8 @@ public void WickeFlame_Yaml_Parser_PropertyList()

var result = parser.Parse();

Assert.AreEqual("1", ((ValueToken)result["Children"][0]["one"]).Value);
Assert.AreEqual("2", ((ValueToken)result["Children"][1]["two"]).Value);
ClassicAssert.AreEqual("1", ((ValueToken)result["Children"][0]["one"]).Value);
ClassicAssert.AreEqual("2", ((ValueToken)result["Children"][1]["two"]).Value);
}

[Test]
Expand All @@ -212,7 +213,7 @@ public void WickeFlame_Yaml_Parser_SubObjectList()

var result = parser.Parse();

Assert.AreEqual("first", ((ValueToken)result["Root"][0]["L1"]["Name"]).Value);
ClassicAssert.AreEqual("first", ((ValueToken)result["Root"][0]["L1"]["Name"]).Value);
}

[Test]
Expand All @@ -231,8 +232,8 @@ public void WickeFlame_Yaml_Parser_ExtendedObjectList()

var result = parser.Parse();

Assert.AreEqual("second", ((ValueToken)result["Root"][0]["L1"]["Name"]).Value);
Assert.AreEqual("third", ((ValueToken)result["Root"][0]["L1"]["L2"]["Name"]).Value);
ClassicAssert.AreEqual("second", ((ValueToken)result["Root"][0]["L1"]["Name"]).Value);
ClassicAssert.AreEqual("third", ((ValueToken)result["Root"][0]["L1"]["L2"]["Name"]).Value);
}

[Test]
Expand All @@ -252,9 +253,9 @@ public void WickeFlame_Yaml_Parser_ExtendedObjectTree()

var result = parser.Parse();

Assert.AreEqual("second", ((ValueToken)result["Root"][0]["L1"]["Name"]).Value);
Assert.AreEqual("third", ((ValueToken)result["Root"][0]["L1"]["L2"]["Name"]).Value);
Assert.AreEqual("first", ((ValueToken)result["Root"][0]["Name"]).Value);
ClassicAssert.AreEqual("second", ((ValueToken)result["Root"][0]["L1"]["Name"]).Value);
ClassicAssert.AreEqual("third", ((ValueToken)result["Root"][0]["L1"]["L2"]["Name"]).Value);
ClassicAssert.AreEqual("first", ((ValueToken)result["Root"][0]["Name"]).Value);
}

[Test]
Expand All @@ -272,8 +273,8 @@ public void WickeFlame_Yaml_Parser_CommentLine()

var result = parser.Parse();

Assert.AreEqual("one", ((ValueToken)result[0]).Value);
Assert.AreEqual("two", ((ValueToken)result[1]).Value);
ClassicAssert.AreEqual("one", ((ValueToken)result[0]).Value);
ClassicAssert.AreEqual("two", ((ValueToken)result[1]).Value);
}

[Test]
Expand All @@ -289,8 +290,8 @@ public void WickeFlame_Yaml_Parser_CommentInLineLine()

var result = parser.Parse();

Assert.AreEqual("one", ((ValueToken)result[0]).Value);
Assert.AreEqual("true", ((ValueToken)result[1]).Value);
ClassicAssert.AreEqual("one", ((ValueToken)result[0]).Value);
ClassicAssert.AreEqual("true", ((ValueToken)result[1]).Value);
}

[Test]
Expand All @@ -307,7 +308,7 @@ public void WickeFlame_Yaml_Parser_InvalidProperty()
var result = parser.Parse();

Assert.That(result.Count == 1);
Assert.AreEqual("true", ((ValueToken)result[0]).Value);
ClassicAssert.AreEqual("true", ((ValueToken)result[0]).Value);
}

[Test]
Expand All @@ -325,7 +326,7 @@ public void YamlMap_Parser_EmptyItem()
var result = parser.Parse();

Assert.That(result.Count == 2);
Assert.AreEqual("true", ((ValueToken)result[1]).Value);
ClassicAssert.AreEqual("true", ((ValueToken)result[1]).Value);
}

[Test]
Expand All @@ -343,7 +344,7 @@ public void YamlMap_Parser_Comment()
var result = parser.Parse();

Assert.That(result.Count == 2);
Assert.AreEqual("true", ((ValueToken)result[1]).Value);
ClassicAssert.AreEqual("true", ((ValueToken)result[1]).Value);
}
}
}
11 changes: 6 additions & 5 deletions src/Tests/YamlMap.Tests/Reader/ParseQuotatedStringTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace YamlMap.Tests.Reader
{
Expand All @@ -19,7 +20,7 @@ public void ParseQuotatedString_DoubleQuotations()
var reader = new YamlReader();
var parsed = reader.Read<PrimitiveValues>(lines);

Assert.AreEqual("[value] test", parsed.Value);
ClassicAssert.AreEqual("[value] test", parsed.Value);
}

[Test]
Expand All @@ -33,7 +34,7 @@ public void ParseQuotatedString_SingleQuotations()
var reader = new YamlReader();
var parsed = reader.Read<PrimitiveValues>(lines);

Assert.AreEqual("[value] test", parsed.Value);
ClassicAssert.AreEqual("[value] test", parsed.Value);
}

[Test]
Expand All @@ -47,7 +48,7 @@ public void ParseQuotatedString_DoubleQuotations_InnerSingle()
var reader = new YamlReader();
var parsed = reader.Read<PrimitiveValues>(lines);

Assert.AreEqual("[value] 'test", parsed.Value);
ClassicAssert.AreEqual("[value] 'test", parsed.Value);
}

[Test]
Expand All @@ -61,7 +62,7 @@ public void ParseQuotatedString_SingleQuotations_InnerDouble()
var reader = new YamlReader();
var parsed = reader.Read<PrimitiveValues>(lines);

Assert.AreEqual("[value] \"test", parsed.Value);
ClassicAssert.AreEqual("[value] \"test", parsed.Value);
}

[Test]
Expand Down Expand Up @@ -124,7 +125,7 @@ public void ParseQuotatedString_DoubleQuotations_Special()
var reader = new YamlReader();
var parsed = reader.Read<PrimitiveValues>(lines);

Assert.AreEqual("c: is a drive", parsed.Value);
ClassicAssert.AreEqual("c: is a drive", parsed.Value);
}

public class PrimitiveValues
Expand Down
10 changes: 5 additions & 5 deletions src/Tests/YamlMap.Tests/Reader/ParseQuotatedTypeStringTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void ParseQuotatedTypeString_DoubleQuotations()
var reader = new YamlReader();
var parsed = reader.Read(typeof(PrimitiveValues), lines) as PrimitiveValues;

Assert.AreEqual("[value] test", parsed.Value);
Assert.That("[value] test", Is.EqualTo(parsed.Value));
}

[Test]
Expand All @@ -33,7 +33,7 @@ public void ParseQuotatedTypeString_SingleQuotations()
var reader = new YamlReader();
var parsed = reader.Read(typeof(PrimitiveValues), lines) as PrimitiveValues;

Assert.AreEqual("[value] test", parsed.Value);
Assert.That("[value] test", Is.EqualTo(parsed.Value));
}

[Test]
Expand All @@ -47,7 +47,7 @@ public void ParseQuotatedTypeString_DoubleQuotations_InnerSingle()
var reader = new YamlReader();
var parsed = reader.Read(typeof(PrimitiveValues), lines) as PrimitiveValues;

Assert.AreEqual("[value] 'test", parsed.Value);
Assert.That("[value] 'test", Is.EqualTo(parsed.Value));
}

[Test]
Expand All @@ -61,7 +61,7 @@ public void ParseQuotatedTypeString_SingleQuotations_InnerDouble()
var reader = new YamlReader();
var parsed = reader.Read(typeof(PrimitiveValues), lines) as PrimitiveValues;

Assert.AreEqual("[value] \"test", parsed.Value);
Assert.That("[value] \"test", Is.EqualTo(parsed.Value));
}

[Test]
Expand Down Expand Up @@ -124,7 +124,7 @@ public void ParseQuotatedTypeString_DoubleQuotations_Special()
var reader = new YamlReader();
var parsed = reader.Read(typeof(PrimitiveValues), lines) as PrimitiveValues;

Assert.AreEqual("c: is a drive", parsed.Value);
Assert.That("c: is a drive", Is.EqualTo(parsed.Value));
}

public class PrimitiveValues
Expand Down
Loading

0 comments on commit 40a9dc9

Please sign in to comment.