Skip to content

Conversation

sensslen
Copy link
Owner

No description provided.

@sensslen sensslen requested a review from Copilot August 12, 2025 07:31
Copilot

This comment was marked as outdated.

sensslen and others added 2 commits August 12, 2025 09:32
…UrlToLicenseMapping.csproj

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sensslen sensslen requested a review from Copilot August 12, 2025 07:34
Copy link

Copy link

@Copilot 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 tests from NUnit to TUnit testing framework. The changes include updating test attributes, replacing NUnit-specific functionality with TUnit equivalents, and updating package dependencies.

  • Replaces NUnit test attributes ([TestFixture], [TestCaseSource], [NonParallelizable]) with TUnit equivalents ([Test], [MethodDataSource], [NotInParallel])
  • Updates package references to use TUnit instead of NUnit and related packages
  • Replaces TestContext.Out.WriteLineAsync with Console.WriteLine for test output

Reviewed Changes

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

File Description
UrlToLicenseMappingTest.cs Migrates test class from NUnit to TUnit attributes and replaces test output mechanism
NuGetUtility.Test.UrlToLicenseMapping.csproj Updates package references to replace NUnit packages with TUnit

[NonParallelizable]
[Test]
[MethodDataSource(typeof(UrlToLicenseMappingTestSource), nameof(UrlToLicenseMappingTestSource.GetDefaultMappings))]
[NotInParallel(nameof(License_Should_Be_Available_And_Match_Expected_License))]
Copy link
Preview

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

The [NotInParallel] attribute appears to be referencing the method itself. This creates a circular reference that may not work as intended. Consider using a shared resource name or removing the parameter if the intent is to prevent parallel execution of this specific test method.

Suggested change
[NotInParallel(nameof(License_Should_Be_Available_And_Match_Expected_License))]
[NotInParallel]

Copilot uses AI. Check for mistakes.

Console.WriteLine($"Failed to check license. Retry count: {retryCount}\n\n");
Console.WriteLine($"Error:");
Console.WriteLine(licenseResult.Error);
Console.WriteLine($"\n\nRetrying after {retryTimeout}ms\n\n");
Copy link
Preview

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

Replacing TestContext.Out.WriteLineAsync with Console.WriteLine may result in test output not being captured by the test framework. Consider using TUnit's equivalent for test output to ensure proper integration with the testing framework.

Suggested change
Console.WriteLine($"\n\nRetrying after {retryTimeout}ms\n\n");
TestContext.WriteLine($"Failed to check license. Retry count: {retryCount}\n\n");
TestContext.WriteLine($"Error:");
TestContext.WriteLine(licenseResult.Error);
TestContext.WriteLine($"\n\nRetrying after {retryTimeout}ms\n\n");

Copilot uses AI. Check for mistakes.

@sensslen sensslen merged commit 65ceb67 into main Aug 12, 2025
23 checks passed
@sensslen sensslen deleted the simon/start-migrating-to-tunit branch August 12, 2025 08:54
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.

1 participant