Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Migrates the NativeAot tests from MSTest to TUnit framework.

Changes

  • Package references: Added TUnit 0.4.105, removed MSTest.Sdk
  • Project SDK: Changed from MSTest.Sdk/3.6.1 to standard Microsoft.NET.Sdk
  • Test attributes: Replaced [TestMethod] with [Test], removed [TestClass]
  • Assertions: Converted to TUnit's awaitable fluent API
  • Test methods: All methods now async Task (required for awaited assertions)
  • Removed: MSTestSettings.cs (MSTest-specific parallel execution config)

Migration pattern

// Before (MSTest)
[TestClass]
public class Tests 
{
    [TestMethod]
    public void MyTest() 
    {
        Assert.AreEqual(expected, actual);
        Assert.IsNotNull(value);
    }
}

// After (TUnit)
public class Tests 
{
    [Test]
    public async Task MyTest() 
    {
        await Assert.That(actual).IsEqualTo(expected);
        await Assert.That(value).IsNotNull();
    }
}

All 11 existing tests pass (5 in ResolverTest, 6 in UnaryTest).

Original prompt

Migrate MagicOnion.Client.NativeAot.Tests from MSTest to TUnit

Custom agent used: C# Expert
An agent designed to assist with software development tasks for .NET projects.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 12, 2025 04:11
Co-authored-by: mayuki <9012+mayuki@users.noreply.github.com>
Co-authored-by: mayuki <9012+mayuki@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate MagicOnion.Client.NativeAot.Tests from MSTest to TUnit Migrate MagicOnion.Client.NativeAot.Tests from MSTest to TUnit Dec 12, 2025
Copilot AI requested a review from mayuki December 12, 2025 04:18
@mayuki mayuki marked this pull request as ready for review December 12, 2025 05:07
@mayuki mayuki merged commit 0041ad3 into main Dec 12, 2025
14 of 15 checks passed
@mayuki mayuki deleted the copilot/migrate-tests-to-tunit branch December 12, 2025 05:08
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