Skip to content

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Nov 21, 2025

This PR migrates the test framework from xUnit to TUnit by replacing test attributes and updating helper utilities.

Key Changes

  • Replaced [Fact] attributes with [Test] throughout test files
  • Replaced [Theory]/[InlineData] with [Test]/[Arguments] for parameterized tests
  • Changed global using from Xunit to TUnit in the test helpers
  • Added a new Record helper class to replace xUnit's Record.Exception functionality
  • Updated assertion syntax in delegate tests to use aweXpect instead of xUnit assertions

@vbreuss vbreuss self-assigned this Nov 21, 2025
Copilot AI review requested due to automatic review settings November 21, 2025 08:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the test framework from xUnit to TUnit by replacing test attributes and updating helper utilities.

Key Changes

  • Replaced [Fact] attributes with [Test] throughout test files
  • Replaced [Theory]/[InlineData] with [Test]/[Arguments] for parameterized tests
  • Changed global using from Xunit to TUnit in the test helpers
  • Added a new Record helper class to replace xUnit's Record.Exception functionality
  • Updated assertion syntax in delegate tests to use aweXpect instead of xUnit assertions

Reviewed Changes

Copilot reviewed 94 out of 94 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Tests/Mockolate.Tests/TestHelpers/Usings.cs Updated global using from Xunit to TUnit
Tests/Mockolate.Tests/TestHelpers/Record.cs Added Record helper class with Exception method for capturing exceptions
Tests/Mockolate.Tests/Verify/*.cs Migrated test attributes from [Fact] to [Test] and [Theory]/[InlineData] to [Test]/[Arguments]
Tests/Mockolate.Tests/MockDelegates/DelegateTests.cs Updated assertions from xUnit Assert to aweXpect syntax
Tests/Mockolate.Tests/Mock*/*.cs Migrated all test attributes to TUnit equivalents across all mock test files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

Test Results

0 files   -    14  0 suites   - 14   0s ⏱️ - 3m 22s
0 tests  - 1 189  0 ✅  - 1 188  0 💤  - 1  0 ❌ ±0 
0 runs   - 7 879  0 ✅  - 7 878  0 💤  - 1  0 ❌ ±0 

Results for commit fb8ec75. ± Comparison against base commit f4b9357.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

🚀 Benchmark Results

Details

BenchmarkDotNet v0.14.0, Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.100
[Host] : .NET 10.0.0 (10.0.25.52411), X64 RyuJIT AVX2

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method Mean Error StdDev Gen0 Gen1 Allocated
Simple_Mockolate 1.388 μs 0.0269 μs 0.0239 μs 0.1984 - 3.24 KB
Simple_Moq 178.191 μs 1.0326 μs 0.9659 μs 0.4883 - 14.55 KB
Simple_NSubstitute 5.857 μs 0.0543 μs 0.0508 μs 0.5569 0.0076 9.14 KB
Simple_FakeItEasy 6.663 μs 0.0299 μs 0.0249 μs 0.4959 - 8.11 KB

@vbreuss vbreuss force-pushed the topic/migrate-to-tunit branch from f73fab0 to 37f8f6c Compare November 21, 2025 08:31
Copilot AI review requested due to automatic review settings November 21, 2025 13:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 96 out of 96 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants