Skip to content

Commit d0ec64a

Browse files
authored
Fix TUnit MethodNotFoundException (#214)
* Fix TUnit MethodNotFoundException * Fix using statements
1 parent 14cc790 commit d0ec64a

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/Snapshooter.TUnit/Snapshooter.TUnit.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="TUnit.Assertions" Version="0.3.20" />
22-
<PackageReference Include="TUnit.Core" Version="0.3.20" />
21+
<PackageReference Include="TUnit.Assertions" Version="0.10.6" />
22+
<PackageReference Include="TUnit.Core" Version="0.10.6" />
2323
</ItemGroup>
2424

2525
</Project>

src/Snapshooter.TUnit/TUnitSnapshotFullNameReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private static string GetCurrentSnapshotName()
9898
{
9999
TestContext currentTestContext = TestContext.Current!;
100100

101-
var typeName = currentTestContext.TestDetails.ClassType.Name;
101+
var typeName = currentTestContext.TestDetails.TestClass.Name;
102102
var methodName = currentTestContext.TestDetails.TestName;
103103
var parameters = SnapshotNameExtension.Create(currentTestContext.TestDetails.TestMethodArguments).ToParamsString();
104104

test/Snapshooter.TUnit.Tests/Snapshooter.TUnit.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="TUnit" Version="0.3.20" />
18+
<PackageReference Include="TUnit" Version="0.10.6" />
1919
</ItemGroup>
2020

2121
</Project>

test/Snapshooter.TUnit.Tests/TUnitAssertTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Threading.Tasks;
3+
using TUnit.Assertions.AssertConditions.Throws;
34
using TUnit.Assertions.Exceptions;
45

56
namespace Snapshooter.TUnit.Tests

0 commit comments

Comments
 (0)