Skip to content

Commit

Permalink
Update to AwesomeAssertions and update verify (#224)
Browse files Browse the repository at this point in the history
* Update to AwesomeAssertions and update verify

* attempt to solve disposal problem
  • Loading branch information
adamhathcock authored Feb 5, 2025
1 parent b056d98 commit 316379b
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 324 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.30.1",
"version": "0.30.6",
"commands": [
"dotnet-csharpier"
],
Expand Down
7 changes: 3 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<ItemGroup>
<PackageVersion Include="altcover" Version="9.0.1" />
<PackageVersion Include="AwesomeAssertions" Version="8.0.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="Bullseye" Version="5.0.0" />
<PackageVersion Include="FluentAssertions" Version="[7.0.0]" />
<PackageVersion Include="GraphQL.Client" Version="6.0.0" />
<PackageVersion Include="Glob" Version="1.1.9" />
<PackageVersion Include="ILRepack.FullAuto" Version="1.6.0" />
Expand All @@ -25,9 +25,8 @@
<PackageVersion Include="Speckle.DoubleNumerics" Version="4.0.1" />
<PackageVersion Include="SimpleExec" Version="12.0.0" />
<PackageVersion Include="System.Threading.Channels" Version="9.0.1" />
<PackageVersion Include="Verify" Version="28.9.0" />
<PackageVersion Include="Verify.Quibble" Version="2.1.1" />
<PackageVersion Include="Verify.Xunit" Version="28.9.0" />
<PackageVersion Include="Verify.Xunit" Version="28.10.1" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.assert" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1" />
Expand All @@ -36,4 +35,4 @@
<GlobalPackageReference Include="GitVersion.MsBuild" Version="5.12.0" />
<GlobalPackageReference Include="Speckle.InterfaceGenerator" Version="0.9.6" />
</ItemGroup>
</Project>
</Project>
55 changes: 27 additions & 28 deletions Speckle.Sdk.Testing/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
},
"Verify.Xunit": {
"type": "Direct",
"requested": "[28.9.0, )",
"resolved": "28.9.0",
"contentHash": "YlgbJzajNvnzTVqWtZuWdZFcShX4MyQqM4FJ28qSf7hY8wvB8G6y2EwHit+Wz/nYrdnCXWYK81JR7dxTxSeuDg==",
"requested": "[28.10.1, )",
"resolved": "28.10.1",
"contentHash": "mkG7agMlx8oAEGcHoRY72hyDyNTdLIrzbfmniXFQgQ3yKulAHSYvYc9quzhpg0Sy+jb3svbdLqnRSg0VRhet3A==",
"dependencies": {
"Argon": "0.26.0",
"DiffEngine": "15.8.0",
"DiffEngine": "15.9.0",
"SimpleInfoName": "3.1.0",
"System.IO.Hashing": "9.0.0",
"Verify": "28.9.0",
"System.IO.Hashing": "9.0.1",
"Verify": "28.10.1",
"xunit.abstractions": "2.0.3",
"xunit.extensibility.execution": "2.9.3"
}
Expand All @@ -79,11 +79,11 @@
},
"DiffEngine": {
"type": "Transitive",
"resolved": "15.8.0",
"contentHash": "+2cUvCcpUWziG6hnns6lwxkj6VVA+WsEGx3JqHIAt/1D7p+zpyWebqXihcfXzrZ5EqQmM4h+PpuUhYWH0TeCvQ==",
"resolved": "15.9.0",
"contentHash": "shE6+tO4w5BmQTX0z+WnUV4UfmPNn6oTqBINbkts6OP0Icyx5WROSDzjjb95EwVYC4IAS+PxxS4Vbapxz4hkdw==",
"dependencies": {
"EmptyFiles": "8.7.1",
"System.Management": "9.0.0"
"System.Management": "9.0.1"
}
},
"EmptyFiles": {
Expand Down Expand Up @@ -256,8 +256,8 @@
},
"System.CodeDom": {
"type": "Transitive",
"resolved": "9.0.0",
"contentHash": "oTE5IfuMoET8yaZP/vdvy9xO47guAv/rOhe4DODuFBN3ySprcQOlXqO3j+e/H/YpKKR5sglrxRaZ2HYOhNJrqA=="
"resolved": "9.0.1",
"contentHash": "2J5uq+2smnj+u1jlyVJ6BGGqaK9fHcK/EwN7mbsuPqTI6dZr86br8Cg6o/5B+icQ9ANTvTDpJjnhDNtYYZijHQ=="
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
Expand All @@ -266,15 +266,15 @@
},
"System.IO.Hashing": {
"type": "Transitive",
"resolved": "9.0.0",
"contentHash": "seeO8icDfED/Qwl9PDFUx2Gf/7xv7dPsMnw5PnRwNZuz4EWMpy0wIVohC4MfCcTIoJgp+KUrWG4WH3NPSusQOA=="
"resolved": "9.0.1",
"contentHash": "jY+E/PElNWQiazN0YHqZGvcSedcZ4Wt0Os1nnJ2SzR3gWZlhNRDkSXOhuHJcLuImD8SrJQQ8TfU0W4mVcit2hg=="
},
"System.Management": {
"type": "Transitive",
"resolved": "9.0.0",
"contentHash": "bVh4xAMI5grY5GZoklKcMBLirhC8Lqzp63Ft3zXJacwGAlLyFdF4k0qz4pnKIlO6HyL2Z4zqmHm9UkzEo6FFsA==",
"resolved": "9.0.1",
"contentHash": "CLEo9O6FuO4GQ3ZQkGssg9CJ2w2TN7GMFf3wHTc7YVWJV4xoyJRPw+XIDQnCcSUJCrHhrAWOO60cAX29EV5LFQ==",
"dependencies": {
"System.CodeDom": "9.0.0"
"System.CodeDom": "9.0.1"
}
},
"System.Memory": {
Expand Down Expand Up @@ -310,6 +310,17 @@
"System.Text.Encodings.Web": "8.0.0"
}
},
"Verify": {
"type": "Transitive",
"resolved": "28.10.1",
"contentHash": "2B/VtFN5jtF5g28kaM4GdJZTwb3pisd4+wL2NEPi9ZYe2lghWsCzS30V6LF1ILApLBfAorAstkU/Vw3sDWRqrg==",
"dependencies": {
"Argon": "0.26.0",
"DiffEngine": "15.9.0",
"SimpleInfoName": "3.1.0",
"System.IO.Hashing": "9.0.1"
}
},
"xunit.abstractions": {
"type": "Transitive",
"resolved": "2.0.3",
Expand Down Expand Up @@ -403,18 +414,6 @@
"requested": "[13.0.2, )",
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"Verify": {
"type": "CentralTransitive",
"requested": "[28.9.0, )",
"resolved": "28.9.0",
"contentHash": "qni0zDkkYSPIhnYejZCOq5ueH+y0s7kEdpSbFXarcxP7rjZvZD0Yuc567KFVFMbVRAo9IORfv9zcXtTGFmpz8A==",
"dependencies": {
"Argon": "0.26.0",
"DiffEngine": "15.8.0",
"SimpleInfoName": "3.1.0",
"System.IO.Hashing": "9.0.0"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="altcover" />
<PackageReference Include="FluentAssertions" />
<PackageReference Include="AwesomeAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit.assert" />
<PackageReference Include="xunit.runner.visualstudio"/>
Expand Down
109 changes: 28 additions & 81 deletions tests/Speckle.Objects.Tests.Unit/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@
"resolved": "9.0.1",
"contentHash": "aadciFNDT5bnylaYUkKal+s5hF7yU/lmZxImQWAlk1438iPqK1Uf79H5ylELpyLIU49HL5ql+tnWBihp3WVLCA=="
},
"FluentAssertions": {
"AwesomeAssertions": {
"type": "Direct",
"requested": "[7.0.0, 7.0.0]",
"resolved": "7.0.0",
"contentHash": "mTLbcU991EQ1SEmNbVBaGGGJy0YFzvGd1sYJGNZ07nlPKuyHSn1I22aeKzqQXgEiaKyRO6MSCto9eN9VxMwBdA==",
"dependencies": {
"System.Configuration.ConfigurationManager": "6.0.0"
}
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "6fWiV7mGZUzZXzeiW3hWF0nJokuuNm4hnzuqbM3IXHqGYkWnHl65+wNpuQ73xfJXClX0fmfKcTdQ2Ula719IDg=="
},
"GitVersion.MsBuild": {
"type": "Direct",
Expand Down Expand Up @@ -74,11 +71,11 @@
},
"DiffEngine": {
"type": "Transitive",
"resolved": "15.8.0",
"contentHash": "+2cUvCcpUWziG6hnns6lwxkj6VVA+WsEGx3JqHIAt/1D7p+zpyWebqXihcfXzrZ5EqQmM4h+PpuUhYWH0TeCvQ==",
"resolved": "15.9.0",
"contentHash": "shE6+tO4w5BmQTX0z+WnUV4UfmPNn6oTqBINbkts6OP0Icyx5WROSDzjjb95EwVYC4IAS+PxxS4Vbapxz4hkdw==",
"dependencies": {
"EmptyFiles": "8.7.1",
"System.Management": "9.0.0"
"System.Management": "9.0.1"
}
},
"EmptyFiles": {
Expand Down Expand Up @@ -200,11 +197,6 @@
"Newtonsoft.Json": "13.0.1"
}
},
"Microsoft.Win32.SystemEvents": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A=="
},
"Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.1",
Expand Down Expand Up @@ -256,42 +248,25 @@
},
"System.CodeDom": {
"type": "Transitive",
"resolved": "9.0.0",
"contentHash": "oTE5IfuMoET8yaZP/vdvy9xO47guAv/rOhe4DODuFBN3ySprcQOlXqO3j+e/H/YpKKR5sglrxRaZ2HYOhNJrqA=="
"resolved": "9.0.1",
"contentHash": "2J5uq+2smnj+u1jlyVJ6BGGqaK9fHcK/EwN7mbsuPqTI6dZr86br8Cg6o/5B+icQ9ANTvTDpJjnhDNtYYZijHQ=="
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
}
},
"System.Drawing.Common": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
"dependencies": {
"Microsoft.Win32.SystemEvents": "6.0.0"
}
},
"System.IO.Hashing": {
"type": "Transitive",
"resolved": "9.0.0",
"contentHash": "seeO8icDfED/Qwl9PDFUx2Gf/7xv7dPsMnw5PnRwNZuz4EWMpy0wIVohC4MfCcTIoJgp+KUrWG4WH3NPSusQOA=="
"resolved": "9.0.1",
"contentHash": "jY+E/PElNWQiazN0YHqZGvcSedcZ4Wt0Os1nnJ2SzR3gWZlhNRDkSXOhuHJcLuImD8SrJQQ8TfU0W4mVcit2hg=="
},
"System.Management": {
"type": "Transitive",
"resolved": "9.0.0",
"contentHash": "bVh4xAMI5grY5GZoklKcMBLirhC8Lqzp63Ft3zXJacwGAlLyFdF4k0qz4pnKIlO6HyL2Z4zqmHm9UkzEo6FFsA==",
"resolved": "9.0.1",
"contentHash": "CLEo9O6FuO4GQ3ZQkGssg9CJ2w2TN7GMFf3wHTc7YVWJV4xoyJRPw+XIDQnCcSUJCrHhrAWOO60cAX29EV5LFQ==",
"dependencies": {
"System.CodeDom": "9.0.0"
"System.CodeDom": "9.0.1"
}
},
"System.Memory": {
Expand All @@ -314,25 +289,6 @@
"resolved": "4.5.1",
"contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw=="
},
"System.Security.AccessControl": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "AUADIc0LIEQe7MzC+I0cl0rAT8RrTAKFHl53yHjEUzNVIaUlhFY11vc2ebiVJzVBuOzun6F7FBA+8KAbGTTedQ=="
},
"System.Security.Cryptography.ProtectedData": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "rp1gMNEZpvx9vP0JW0oHLxlf8oSiQgtno77Y4PLUBjSiDYoD77Y8uXHr1Ea5XG4/pIKhqAdxZ8v8OTUtqo9PeQ=="
},
"System.Security.Permissions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "T/uuc7AklkDoxmcJ7LGkyX1CcSviZuLCa4jg3PekfJ7SU0niF0IVTXwUiNVP9DSpzou2PpxJ+eNY2IfDM90ZCg==",
"dependencies": {
"System.Security.AccessControl": "6.0.0",
"System.Windows.Extensions": "6.0.0"
}
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "8.0.0",
Expand All @@ -346,12 +302,15 @@
"System.Text.Encodings.Web": "8.0.0"
}
},
"System.Windows.Extensions": {
"Verify": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "IXoJOXIqc39AIe+CIR7koBtRGMiCt/LPM3lI+PELtDIy9XdyeSrwXFdWV9dzJ2Awl0paLWUaknLxFQ5HpHZUog==",
"resolved": "28.10.1",
"contentHash": "2B/VtFN5jtF5g28kaM4GdJZTwb3pisd4+wL2NEPi9ZYe2lghWsCzS30V6LF1ILApLBfAorAstkU/Vw3sDWRqrg==",
"dependencies": {
"System.Drawing.Common": "6.0.0"
"Argon": "0.26.0",
"DiffEngine": "15.9.0",
"SimpleInfoName": "3.1.0",
"System.IO.Hashing": "9.0.1"
}
},
"xunit.abstractions": {
Expand Down Expand Up @@ -403,7 +362,7 @@
"Microsoft.NET.Test.Sdk": "[17.12.0, )",
"Speckle.Sdk": "[1.0.0, )",
"Verify.Quibble": "[2.1.1, )",
"Verify.Xunit": "[28.9.0, )",
"Verify.Xunit": "[28.10.1, )",
"xunit.runner.visualstudio": "[3.0.1, )"
}
},
Expand Down Expand Up @@ -464,18 +423,6 @@
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"Verify": {
"type": "CentralTransitive",
"requested": "[28.9.0, )",
"resolved": "28.9.0",
"contentHash": "qni0zDkkYSPIhnYejZCOq5ueH+y0s7kEdpSbFXarcxP7rjZvZD0Yuc567KFVFMbVRAo9IORfv9zcXtTGFmpz8A==",
"dependencies": {
"Argon": "0.26.0",
"DiffEngine": "15.8.0",
"SimpleInfoName": "3.1.0",
"System.IO.Hashing": "9.0.0"
}
},
"Verify.Quibble": {
"type": "CentralTransitive",
"requested": "[2.1.1, )",
Expand All @@ -489,15 +436,15 @@
},
"Verify.Xunit": {
"type": "CentralTransitive",
"requested": "[28.9.0, )",
"resolved": "28.9.0",
"contentHash": "YlgbJzajNvnzTVqWtZuWdZFcShX4MyQqM4FJ28qSf7hY8wvB8G6y2EwHit+Wz/nYrdnCXWYK81JR7dxTxSeuDg==",
"requested": "[28.10.1, )",
"resolved": "28.10.1",
"contentHash": "mkG7agMlx8oAEGcHoRY72hyDyNTdLIrzbfmniXFQgQ3yKulAHSYvYc9quzhpg0Sy+jb3svbdLqnRSg0VRhet3A==",
"dependencies": {
"Argon": "0.26.0",
"DiffEngine": "15.8.0",
"DiffEngine": "15.9.0",
"SimpleInfoName": "3.1.0",
"System.IO.Hashing": "9.0.0",
"Verify": "28.9.0",
"System.IO.Hashing": "9.0.1",
"Verify": "28.10.1",
"xunit.abstractions": "2.0.3",
"xunit.extensibility.execution": "2.9.3"
}
Expand Down
31 changes: 18 additions & 13 deletions tests/Speckle.Sdk.Serialization.Tests/SerializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,19 +226,24 @@ public async Task Roundtrip_Test_New(string fileName, string rootId, int oldCoun
process.Total.Should().Be(oldCount);

var newIdToJson = new ConcurrentDictionary<string, string>();
using var serializeProcess = new SerializeProcess(
null,
new DummySqLiteSendManager(),
new DummySendServerObjectManager(newIdToJson),
new BaseChildFinder(new BasePropertyGatherer()),
new BaseSerializer(new DummySqLiteSendManager(), new ObjectSerializerFactory(new BasePropertyGatherer())),
new NullLoggerFactory(),
default,
new SerializeProcessOptions(true, true, false, true)
);
var (rootId2, _) = await serializeProcess.Serialize(root);

rootId2.Should().Be(root.id);
using (
var serializeProcess = new SerializeProcess(
null,
new DummySqLiteSendManager(),
new DummySendServerObjectManager(newIdToJson),
new BaseChildFinder(new BasePropertyGatherer()),
new BaseSerializer(new DummySqLiteSendManager(), new ObjectSerializerFactory(new BasePropertyGatherer())),
new NullLoggerFactory(),
default,
new SerializeProcessOptions(true, true, false, true)
)
)
{
var (rootId2, _) = await serializeProcess.Serialize(root);
rootId2.Should().Be(root.id);
}
//ensures threads are done?
await Task.Delay(TimeSpan.FromSeconds(2));
newIdToJson.Count.Should().Be(newCount);

foreach (var newKvp in newIdToJson)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="altcover" />
<PackageReference Include="FluentAssertions" />
<PackageReference Include="AwesomeAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit.assert" />
<PackageReference Include="xunit.runner.visualstudio"/>
Expand Down
Loading

0 comments on commit 316379b

Please sign in to comment.