Skip to content

Commit

Permalink
merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed Jan 3, 2025
1 parent 6576cbf commit 7d849d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
6 changes: 3 additions & 3 deletions tests/Speckle.Sdk.Tests.Unit/Serialisation/BatchTests.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using NUnit.Framework;
using Shouldly;
using Speckle.Sdk.Serialisation.V2.Send;
using Xunit;

namespace Speckle.Sdk.Tests.Unit.Serialisation;

[TestFixture]
public class BatchTests
{
private class BatchItem : IHasSize
Expand All @@ -17,7 +17,7 @@ public BatchItem(int size)
public int Size { get; }
}

[Test]
[Fact]
public void TestBatchSize_Calc()
{
var batch = new Batch<BatchItem>(4);
Expand All @@ -27,7 +27,7 @@ public void TestBatchSize_Calc()
batch.Size.ShouldBe(3);
}

[Test]
[Fact]
public void TestBatchSize_Trim()
{
var batch = new Batch<BatchItem>(4);
Expand Down
18 changes: 3 additions & 15 deletions tests/Speckle.Sdk.Tests.Unit/Serialisation/SimpleRoundTripTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,16 @@

namespace Speckle.Sdk.Tests.Unit.Serialisation;

[TestFixture]
public class SimpleRoundTripTests
{
private IOperations _operations;

static SimpleRoundTripTests()
{
Reset();
}

private static void Reset()
public SimpleRoundTripTests()
{
TypeLoader.Reset();
TypeLoader.Initialize(typeof(Base).Assembly, Assembly.GetExecutingAssembly());
var serviceProvider = TestServiceSetup.GetServiceProvider();
_operations = serviceProvider.GetRequiredService<IOperations>();
}

public static IEnumerable<object[]> TestData() => TestDataInternal().Select(x => new object[] { x });
Expand All @@ -40,14 +36,6 @@ public static IEnumerable<Base> TestDataInternal()
yield return polyline;
}

public SimpleRoundTripTests()
{
Reset();

var serviceProvider = TestServiceSetup.GetServiceProvider();
_operations = serviceProvider.GetRequiredService<IOperations>();
}

[Theory]
[MemberData(nameof(TestData))]
public async Task SimpleSerialization(Base testData)
Expand Down

0 comments on commit 7d849d5

Please sign in to comment.