diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 665e4894..d15ac580 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,9 +3,9 @@ "isRoot": true, "tools": { "csharpier": { - "version": "0.30.6", + "version": "1.0.0", "commands": [ - "dotnet-csharpier" + "csharpier" ], "rollForward": false }, diff --git a/.csharpierignore b/.csharpierignore new file mode 100644 index 00000000..9112f6b9 --- /dev/null +++ b/.csharpierignore @@ -0,0 +1,2 @@ +Directory.Build.targets +Directory.Build.props \ No newline at end of file diff --git a/.csharpierrc.yaml b/.csharpierrc.yaml index 152a7153..b8bb4252 100644 --- a/.csharpierrc.yaml +++ b/.csharpierrc.yaml @@ -1,6 +1,6 @@ printWidth: 120 useTabs: false -tabWidth: 2 +indentSize: 2 preprocessorSymbolSets: - "" - "DEBUG" diff --git a/Directory.Build.props b/Directory.Build.props index e37df49c..5d176b67 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,4 @@ - 12 enable @@ -7,7 +6,6 @@ true true - @@ -22,18 +20,16 @@ speckle Apache-2.0 - - false + false + true true $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - true - true latest-AllEnabledByDefault @@ -41,7 +37,6 @@ true false true - @@ -59,28 +54,20 @@ CA1502;CA1716;NETSDK1206; $(NoWarn) - + - $(MSBuildThisFileDirectory) - - + - - + + - - + - diff --git a/Directory.Build.targets b/Directory.Build.targets index 10e64e3a..ddff399d 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,18 +1,17 @@ - - - $(NoWarn); - - CS0618;CA1034;CA2201;CA1051;CA1040;CA1724; - IDE0044;IDE0130;CA1508; - - CA5394;CA2007;CA1852;CA1819;CA1711;CA1063;CA1816;CA2234;CS8618;CA1054;CA1810;CA2208;CA1019;CA1831; - - - + + + + CS0618;CA1034;CA2201;CA1051;CA1040;CA1724; + IDE0044;IDE0130;CA1508; + + CA5394;CA2007;CA1852;CA1819;CA1711;CA1063;CA1816;CA2234;CS8618;CA1054;CA1810;CA2208;CA1019;CA1831; + $(NoWarn); + + - - - + + + diff --git a/build/Program.cs b/build/Program.cs index 3664b8a5..5b3e2798 100644 --- a/build/Program.cs +++ b/build/Program.cs @@ -68,7 +68,7 @@ Target( Target(RESTORE_TOOLS, () => RunAsync("dotnet", "tool restore")); -Target(FORMAT, dependsOn: [RESTORE_TOOLS], () => RunAsync("dotnet", "csharpier --check .")); +Target(FORMAT, dependsOn: [RESTORE_TOOLS], () => RunAsync("dotnet", "csharpier check .")); Target(RESTORE, dependsOn: [FORMAT], () => RunAsync("dotnet", "restore Speckle.Sdk.sln --locked-mode")); diff --git a/build/build.csproj b/build/build.csproj index f26eb8c9..06a9d6ac 100644 --- a/build/build.csproj +++ b/build/build.csproj @@ -1,10 +1,9 @@  - Exe net8.0 - + diff --git a/src/Speckle.Objects/Geometry/Plane.cs b/src/Speckle.Objects/Geometry/Plane.cs index 2da4b1bf..0701cb22 100644 --- a/src/Speckle.Objects/Geometry/Plane.cs +++ b/src/Speckle.Objects/Geometry/Plane.cs @@ -68,7 +68,6 @@ public class Plane : Base, ITransformable /// Returns the values of this as a list of numbers /// /// A list of values representing the Plane. - public List ToList() { var list = new List(); diff --git a/src/Speckle.Objects/Geometry/Surface.cs b/src/Speckle.Objects/Geometry/Surface.cs index d97ed633..9d9944ca 100644 --- a/src/Speckle.Objects/Geometry/Surface.cs +++ b/src/Speckle.Objects/Geometry/Surface.cs @@ -147,7 +147,6 @@ public class Surface : Base, IHasBoundingBox, IHasArea, ITransformable /// /// A 2-dimensional array representing this s control points. /// The ControlPoints will be ordered following directions "[u][v]" - public List> GetControlPoints() { var matrix = new List>(); diff --git a/src/Speckle.Objects/Speckle.Objects.csproj b/src/Speckle.Objects/Speckle.Objects.csproj index aeddfb0e..1d7e3ad3 100644 --- a/src/Speckle.Objects/Speckle.Objects.csproj +++ b/src/Speckle.Objects/Speckle.Objects.csproj @@ -1,37 +1,30 @@ - netstandard2.0;net8.0 System.Runtime.CompilerServices.RequiresLocationAttribute Debug;Release;Local - Speckle.Objects Objects is the default object model for Speckle $(PackageTags) objects - true true snupkg - $(NoWarn); CA1819;CA1008;CA2225; - - - diff --git a/src/Speckle.Sdk.Dependencies/Speckle.Sdk.Dependencies.csproj b/src/Speckle.Sdk.Dependencies/Speckle.Sdk.Dependencies.csproj index b33a09ef..043b7876 100644 --- a/src/Speckle.Sdk.Dependencies/Speckle.Sdk.Dependencies.csproj +++ b/src/Speckle.Sdk.Dependencies/Speckle.Sdk.Dependencies.csproj @@ -1,5 +1,4 @@ - netstandard2.0;net8.0 Debug;Release;Local @@ -7,30 +6,26 @@ true true - Speckle.Sdk.Dependencies The .NET SDK for Speckle $(PackageTags) core sdk - true true snupkg - - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - diff --git a/src/Speckle.Sdk/Speckle.Sdk.csproj b/src/Speckle.Sdk/Speckle.Sdk.csproj index 97406570..ed86cb32 100644 --- a/src/Speckle.Sdk/Speckle.Sdk.csproj +++ b/src/Speckle.Sdk/Speckle.Sdk.csproj @@ -1,50 +1,43 @@ - netstandard2.0;net8.0 Debug;Release;Local true - Speckle.Sdk The .NET SDK for Speckle $(PackageTags) core sdk $(NoWarn);CS8618 - true true snupkg - - - - + + - + - - + - + - diff --git a/tests/Speckle.Objects.Tests.Unit/Speckle.Objects.Tests.Unit.csproj b/tests/Speckle.Objects.Tests.Unit/Speckle.Objects.Tests.Unit.csproj index 15eb3455..5be854e5 100644 --- a/tests/Speckle.Objects.Tests.Unit/Speckle.Objects.Tests.Unit.csproj +++ b/tests/Speckle.Objects.Tests.Unit/Speckle.Objects.Tests.Unit.csproj @@ -1,21 +1,18 @@ - net8.0 true System.Runtime.CompilerServices.IsExternalInit - - + - + - diff --git a/tests/Speckle.Sdk.Serialization.Testing/Speckle.Sdk.Serialization.Testing.csproj b/tests/Speckle.Sdk.Serialization.Testing/Speckle.Sdk.Serialization.Testing.csproj index 3d97bc78..b497eb60 100644 --- a/tests/Speckle.Sdk.Serialization.Testing/Speckle.Sdk.Serialization.Testing.csproj +++ b/tests/Speckle.Sdk.Serialization.Testing/Speckle.Sdk.Serialization.Testing.csproj @@ -1,11 +1,10 @@  - - - Exe - net8.0 - enable - enable - + + Exe + net8.0 + enable + enable + @@ -13,5 +12,4 @@ - diff --git a/tests/Speckle.Sdk.Serialization.Tests/CancellationTests.cs b/tests/Speckle.Sdk.Serialization.Tests/CancellationTests.cs index 93e721d5..10d79161 100644 --- a/tests/Speckle.Sdk.Serialization.Tests/CancellationTests.cs +++ b/tests/Speckle.Sdk.Serialization.Tests/CancellationTests.cs @@ -41,8 +41,8 @@ public class CancellationTests new SerializeProcessOptions(true, true, false, true) ); await cancellationSource.CancelAsync(); - var ex = await Assert.ThrowsAsync( - async () => await serializeProcess.Serialize(testClass) + var ex = await Assert.ThrowsAsync(async () => + await serializeProcess.Serialize(testClass) ); await Verify(ex); cancellationSource.IsCancellationRequested.Should().BeTrue(); @@ -62,8 +62,8 @@ public class CancellationTests cancellationSource.Token, new SerializeProcessOptions(true, true, false, true) ); - var ex = await Assert.ThrowsAsync( - async () => await serializeProcess.Serialize(testClass) + var ex = await Assert.ThrowsAsync(async () => + await serializeProcess.Serialize(testClass) ); await Verify(ex); cancellationSource.IsCancellationRequested.Should().BeTrue(); @@ -83,8 +83,8 @@ public class CancellationTests new SerializeProcessOptions(true, true, false, true) ); - var ex = await Assert.ThrowsAsync( - async () => await serializeProcess.Serialize(testClass) + var ex = await Assert.ThrowsAsync(async () => + await serializeProcess.Serialize(testClass) ); await Verify(ex); cancellationSource.IsCancellationRequested.Should().BeTrue(); diff --git a/tests/Speckle.Sdk.Serialization.Tests/Speckle.Sdk.Serialization.Tests.csproj b/tests/Speckle.Sdk.Serialization.Tests/Speckle.Sdk.Serialization.Tests.csproj index bea3bd9b..8eaa874f 100644 --- a/tests/Speckle.Sdk.Serialization.Tests/Speckle.Sdk.Serialization.Tests.csproj +++ b/tests/Speckle.Sdk.Serialization.Tests/Speckle.Sdk.Serialization.Tests.csproj @@ -1,30 +1,25 @@ - net8.0 true System.Runtime.CompilerServices.IsExternalInit;System.Runtime.CompilerServices.RequiresLocationAttribute - - + - + - - - diff --git a/tests/Speckle.Sdk.Testing/Speckle.Sdk.Testing.csproj b/tests/Speckle.Sdk.Testing/Speckle.Sdk.Testing.csproj index 31e3a487..756d2c60 100644 --- a/tests/Speckle.Sdk.Testing/Speckle.Sdk.Testing.csproj +++ b/tests/Speckle.Sdk.Testing/Speckle.Sdk.Testing.csproj @@ -1,18 +1,14 @@  - - - net8.0 - true - - - - - - - - - - - - + + net8.0 + true + + + + + + + + + diff --git a/tests/Speckle.Sdk.Tests.Integration/Api/GraphQL/GraphQLClientExceptionHandling.cs b/tests/Speckle.Sdk.Tests.Integration/Api/GraphQL/GraphQLClientExceptionHandling.cs index b72b5977..900b530f 100644 --- a/tests/Speckle.Sdk.Tests.Integration/Api/GraphQL/GraphQLClientExceptionHandling.cs +++ b/tests/Speckle.Sdk.Tests.Integration/Api/GraphQL/GraphQLClientExceptionHandling.cs @@ -48,8 +48,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime """; GraphQLRequest request = new(query: QUERY); - var ex = await Assert.ThrowsAsync( - async () => await _sut.ExecuteGraphQLRequest(request).ConfigureAwait(false) + var ex = await Assert.ThrowsAsync(async () => + await _sut.ExecuteGraphQLRequest(request).ConfigureAwait(false) ); ex.InnerExceptions.OfType().Count().Should().Be(1); } @@ -66,8 +66,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime } """; GraphQLRequest request = new(query: QUERY); - var ex = await Assert.ThrowsAsync( - async () => await _sut.ExecuteGraphQLRequest(request).ConfigureAwait(false) + var ex = await Assert.ThrowsAsync(async () => + await _sut.ExecuteGraphQLRequest(request).ConfigureAwait(false) ); ex.InnerExceptions.OfType().Count().Should().Be(1); } @@ -79,8 +79,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime public async Task TestGraphQLLayer_BadInput() { ProjectUpdateRoleInput input = new(null!, null!, null); - var ex = await Assert.ThrowsAsync( - async () => await _sut.Project.UpdateRole(input).ConfigureAwait(false) + var ex = await Assert.ThrowsAsync(async () => + await _sut.Project.UpdateRole(input).ConfigureAwait(false) ); ex.InnerExceptions.OfType().Count().Should().Be(2); } @@ -91,8 +91,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime using CancellationTokenSource cts = new(); await cts.CancelAsync(); - var ex = await Assert.ThrowsAsync( - async () => await _sut.ActiveUser.Get(cts.Token).ConfigureAwait(false) + var ex = await Assert.ThrowsAsync(async () => + await _sut.ActiveUser.Get(cts.Token).ConfigureAwait(false) ); ex.CancellationToken.Should().BeEquivalentTo(cts.Token); @@ -121,8 +121,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime } """; GraphQLRequest request = new(query: QUERY); - await Assert.ThrowsAsync( - async () => await _sut.ExecuteGraphQLRequest(request).ConfigureAwait(false) + await Assert.ThrowsAsync(async () => + await _sut.ExecuteGraphQLRequest(request).ConfigureAwait(false) ); } } diff --git a/tests/Speckle.Sdk.Tests.Integration/Api/GraphQL/Resources/ProjectResourceExceptionalTests.cs b/tests/Speckle.Sdk.Tests.Integration/Api/GraphQL/Resources/ProjectResourceExceptionalTests.cs index c54df264..12588126 100644 --- a/tests/Speckle.Sdk.Tests.Integration/Api/GraphQL/Resources/ProjectResourceExceptionalTests.cs +++ b/tests/Speckle.Sdk.Tests.Integration/Api/GraphQL/Resources/ProjectResourceExceptionalTests.cs @@ -54,8 +54,8 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime Project privateStream = await Sut.Create(input); - var ex = await Assert.ThrowsAsync( - async () => _ = await _unauthedUser.Project.Get(privateStream.id) + var ex = await Assert.ThrowsAsync(async () => + _ = await _unauthedUser.Project.Get(privateStream.id) ); ex.InnerExceptions.Single().Should().BeOfType(); } @@ -70,8 +70,8 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime [Fact] public async Task ProjectUpdate_NonExistentProject() { - var ex = await Assert.ThrowsAsync( - async () => _ = await Sut.Update(new("NonExistentProject", "My new name")) + var ex = await Assert.ThrowsAsync(async () => + _ = await Sut.Update(new("NonExistentProject", "My new name")) ); ex.InnerExceptions.Single().Should().BeOfType(); } @@ -79,8 +79,8 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime [Fact] public async Task ProjectUpdate_NoAuth() { - var ex = await Assert.ThrowsAsync( - async () => _ = await _unauthedUser.Project.Update(new(_testProject.id, "My new name")) + var ex = await Assert.ThrowsAsync(async () => + _ = await _unauthedUser.Project.Update(new(_testProject.id, "My new name")) ); ex.InnerExceptions.Single().Should().BeOfType(); } @@ -107,8 +107,7 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime { ProjectUpdateRoleInput input = new(_secondUser.Account.id.NotNull(), "NonExistentProject", newRole); - var ex = await Assert.ThrowsAsync( - async () => _ = await _unauthedUser.Project.UpdateRole(input) + var ex = await Assert.ThrowsAsync(async () => _ = await _unauthedUser.Project.UpdateRole(input) ); ex.InnerExceptions.Single().Should().BeOfType(); } diff --git a/tests/Speckle.Sdk.Tests.Integration/Credentials/UserServerInfoTests.cs b/tests/Speckle.Sdk.Tests.Integration/Credentials/UserServerInfoTests.cs index dad46fb6..de8a2f20 100644 --- a/tests/Speckle.Sdk.Tests.Integration/Credentials/UserServerInfoTests.cs +++ b/tests/Speckle.Sdk.Tests.Integration/Credentials/UserServerInfoTests.cs @@ -40,8 +40,8 @@ public class UserServerInfoTests : IAsyncLifetime Uri serverUrl = new(_acc.serverInfo.url); await FluentActions - .Invoking( - async () => await Fixtures.ServiceProvider.GetRequiredService().GetServerInfo(serverUrl) + .Invoking(async () => + await Fixtures.ServiceProvider.GetRequiredService().GetServerInfo(serverUrl) ) .Should() .ThrowAsync(); @@ -53,8 +53,8 @@ public class UserServerInfoTests : IAsyncLifetime Uri serverUrl = new("http://invalidserver.local"); await FluentActions - .Invoking( - async () => await Fixtures.ServiceProvider.GetRequiredService().GetServerInfo(serverUrl) + .Invoking(async () => + await Fixtures.ServiceProvider.GetRequiredService().GetServerInfo(serverUrl) ) .Should() .ThrowAsync(); @@ -81,8 +81,8 @@ public class UserServerInfoTests : IAsyncLifetime Uri serverUrl = new("http://invalidserver.local"); await FluentActions - .Invoking( - async () => await Fixtures.ServiceProvider.GetRequiredService().GetUserInfo("", serverUrl) + .Invoking(async () => + await Fixtures.ServiceProvider.GetRequiredService().GetUserInfo("", serverUrl) ) .Should() .ThrowAsync(); @@ -93,11 +93,10 @@ public class UserServerInfoTests : IAsyncLifetime { Uri serverUrl = new(_acc.serverInfo.url); await FluentActions - .Invoking( - async () => - await Fixtures - .ServiceProvider.GetRequiredService() - .GetUserInfo("Bearer 08913c3c1e7ac65d779d1e1f11b942a44ad9672ca9", serverUrl) + .Invoking(async () => + await Fixtures + .ServiceProvider.GetRequiredService() + .GetUserInfo("Bearer 08913c3c1e7ac65d779d1e1f11b942a44ad9672ca9", serverUrl) ) .Should() .ThrowAsync(); diff --git a/tests/Speckle.Sdk.Tests.Integration/Speckle.Sdk.Tests.Integration.csproj b/tests/Speckle.Sdk.Tests.Integration/Speckle.Sdk.Tests.Integration.csproj index 115bf270..778355be 100644 --- a/tests/Speckle.Sdk.Tests.Integration/Speckle.Sdk.Tests.Integration.csproj +++ b/tests/Speckle.Sdk.Tests.Integration/Speckle.Sdk.Tests.Integration.csproj @@ -1,23 +1,19 @@ - net8.0 true System.Runtime.CompilerServices.IsExternalInit - - + - - diff --git a/tests/Speckle.Sdk.Tests.Performance/Benchmarks/GeneralDeserializerTest.cs b/tests/Speckle.Sdk.Tests.Performance/Benchmarks/GeneralDeserializerTest.cs index e6cc814a..eb55c025 100644 --- a/tests/Speckle.Sdk.Tests.Performance/Benchmarks/GeneralDeserializerTest.cs +++ b/tests/Speckle.Sdk.Tests.Performance/Benchmarks/GeneralDeserializerTest.cs @@ -27,7 +27,6 @@ public class GeneralDeserializer : IDisposable private const string streamId = "a3ac1b2706"; private const string rootId = "7d53bcf28c6696ecac8781684a0aa006";*/ - private const string url = "https://latest.speckle.systems/projects/2099ac4b5f/models/da511c4d1e"; //perf? private const string streamId = "2099ac4b5f"; private const string rootId = "30fb4cbe6eb2202b9e7b4a4fcc3dd2b6"; diff --git a/tests/Speckle.Sdk.Tests.Performance/Benchmarks/GeneralReceiveTest.cs b/tests/Speckle.Sdk.Tests.Performance/Benchmarks/GeneralReceiveTest.cs index cb62d9dc..fbb060ca 100644 --- a/tests/Speckle.Sdk.Tests.Performance/Benchmarks/GeneralReceiveTest.cs +++ b/tests/Speckle.Sdk.Tests.Performance/Benchmarks/GeneralReceiveTest.cs @@ -22,7 +22,6 @@ public class GeneralReceiveTest : IDisposable private const string streamId = "a3ac1b2706";S private const string rootId = "7d53bcf28c6696ecac8781684a0aa006";*/ - private const string url = "https://latest.speckle.systems/projects/2099ac4b5f/models/da511c4d1e"; //perf? private readonly Uri _baseUrl = new("https://latest.speckle.systems"); private const string streamId = "2099ac4b5f"; diff --git a/tests/Speckle.Sdk.Tests.Performance/Speckle.Sdk.Tests.Performance.csproj b/tests/Speckle.Sdk.Tests.Performance/Speckle.Sdk.Tests.Performance.csproj index 5dcc0434..c1217da2 100644 --- a/tests/Speckle.Sdk.Tests.Performance/Speckle.Sdk.Tests.Performance.csproj +++ b/tests/Speckle.Sdk.Tests.Performance/Speckle.Sdk.Tests.Performance.csproj @@ -1,22 +1,17 @@  - - - Exe - net8.0 - enable - disable - true - - - - - - + + Exe + net8.0 + enable + disable + true + + + + - - - - - - + + + + diff --git a/tests/Speckle.Sdk.Tests.Unit/Api/ClientResiliencyPolicyTest.cs b/tests/Speckle.Sdk.Tests.Unit/Api/ClientResiliencyPolicyTest.cs index 7b6d9748..1761dc50 100644 --- a/tests/Speckle.Sdk.Tests.Unit/Api/ClientResiliencyPolicyTest.cs +++ b/tests/Speckle.Sdk.Tests.Unit/Api/ClientResiliencyPolicyTest.cs @@ -37,16 +37,15 @@ public sealed class GraphQLClientTests : IDisposable { var tokenSource = new CancellationTokenSource(); tokenSource.Cancel(); - await _client.ExecuteWithResiliencePolicies( - async () => - await Task.Run( - async () => - { - await Task.Delay(1000); - return "foo"; - }, - tokenSource.Token - ) + await _client.ExecuteWithResiliencePolicies(async () => + await Task.Run( + async () => + { + await Task.Delay(1000); + return "foo"; + }, + tokenSource.Token + ) ); }); timer.Stop(); diff --git a/tests/Speckle.Sdk.Tests.Unit/Api/GraphQLErrorHandler.cs b/tests/Speckle.Sdk.Tests.Unit/Api/GraphQLErrorHandler.cs index a41f8c10..b379f8eb 100644 --- a/tests/Speckle.Sdk.Tests.Unit/Api/GraphQLErrorHandler.cs +++ b/tests/Speckle.Sdk.Tests.Unit/Api/GraphQLErrorHandler.cs @@ -24,12 +24,11 @@ public class GraphQLErrorHandlerTests [MemberData(nameof(ErrorCases))] public void TestExceptionThrowingFromGraphQLErrors(Type exType, Map extensions) { - var ex = Assert.Throws( - () => - new GraphQLResponse - { - Errors = [new() { Extensions = extensions }], - }.EnsureGraphQLSuccess() + var ex = Assert.Throws(() => + new GraphQLResponse + { + Errors = [new() { Extensions = extensions }], + }.EnsureGraphQLSuccess() ); ex.InnerExceptions.Count.Should().Be(1); ex.InnerExceptions[0].Should().BeOfType(exType); diff --git a/tests/Speckle.Sdk.Tests.Unit/Helpers/SpeckleHttpTests.cs b/tests/Speckle.Sdk.Tests.Unit/Helpers/SpeckleHttpTests.cs index 5b03545c..22040c4d 100644 --- a/tests/Speckle.Sdk.Tests.Unit/Helpers/SpeckleHttpTests.cs +++ b/tests/Speckle.Sdk.Tests.Unit/Helpers/SpeckleHttpTests.cs @@ -36,8 +36,7 @@ public class SpeckleHttpTests : MoqTest var uri = new Uri("https://speckle.xyz"); mockHttp.When(uri.AbsoluteUri).Respond(HttpStatusCode.Unauthorized); - await Assert.ThrowsAsync( - async () => await speckleHttp.HttpPing(uri, mockHttp.ToHttpClient()) + await Assert.ThrowsAsync(async () => await speckleHttp.HttpPing(uri, mockHttp.ToHttpClient()) ); } diff --git a/tests/Speckle.Sdk.Tests.Unit/SQLite/SQLiteJsonExceptionTests.cs b/tests/Speckle.Sdk.Tests.Unit/SQLite/SQLiteJsonExceptionTests.cs index 434aa223..c9dd6aa4 100644 --- a/tests/Speckle.Sdk.Tests.Unit/SQLite/SQLiteJsonExceptionTests.cs +++ b/tests/Speckle.Sdk.Tests.Unit/SQLite/SQLiteJsonExceptionTests.cs @@ -9,8 +9,8 @@ public class SqLiteJsonCacheExceptionTests public void ExpectedExceptionFires_Void() { using var pool = new CacheDbCommandPool("DataSource=:memory:", 1); - Assert.Throws( - () => pool.Use(CacheOperation.Get, new Action(_ => throw new SqliteException("test", 1, 1))) + Assert.Throws(() => + pool.Use(CacheOperation.Get, new Action(_ => throw new SqliteException("test", 1, 1))) ); } @@ -18,8 +18,8 @@ public class SqLiteJsonCacheExceptionTests public void ExpectedExceptionFires_Return() { using var pool = new CacheDbCommandPool("DataSource=:memory:", 1); - Assert.Throws( - () => pool.Use(CacheOperation.Get, new Func(_ => throw new SqliteException("test", 1, 1))) + Assert.Throws(() => + pool.Use(CacheOperation.Get, new Func(_ => throw new SqliteException("test", 1, 1))) ); } } diff --git a/tests/Speckle.Sdk.Tests.Unit/Speckle.Sdk.Tests.Unit.csproj b/tests/Speckle.Sdk.Tests.Unit/Speckle.Sdk.Tests.Unit.csproj index 0ea2762d..0e09805e 100644 --- a/tests/Speckle.Sdk.Tests.Unit/Speckle.Sdk.Tests.Unit.csproj +++ b/tests/Speckle.Sdk.Tests.Unit/Speckle.Sdk.Tests.Unit.csproj @@ -1,25 +1,21 @@ - net8.0 - true + true System.Runtime.CompilerServices.IsExternalInit;System.Runtime.CompilerServices.RequiresLocationAttribute - - + - + - -