-
-
Notifications
You must be signed in to change notification settings - Fork 125
Comparing changes
Open a pull request
base repository: thomhurst/TUnit
base: v1.18.21
head repository: thomhurst/TUnit
compare: v1.19.0
- 19 commits
- 198 files changed
- 4 contributors
Commits on Mar 3, 2026
-
chore(deps): update tunit to 1.18.21 (#5076)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for 25cfb1a - Browse repository at this point
Copy the full SHA 25cfb1aView commit details
Commits on Mar 4, 2026
-
Configuration menu - View commit details
-
Copy full SHA for e6e2194 - Browse repository at this point
Copy the full SHA e6e2194View commit details -
chore(deps): update dependency polyfill to 9.16.0 (#5080)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for aada97d - Browse repository at this point
Copy the full SHA aada97dView commit details -
chore(deps): update dependency polyfill to 9.16.0 (#5079)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for e280897 - Browse repository at this point
Copy the full SHA e280897View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5837fb6 - Browse repository at this point
Copy the full SHA 5837fb6View commit details -
chore(deps): update dependency polyfill to 9.17.0 (#5082)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for d8d6bf5 - Browse repository at this point
Copy the full SHA d8d6bf5View commit details -
chore(deps): update dependency polyfill to 9.17.0 (#5081)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for 62a72b3 - Browse repository at this point
Copy the full SHA 62a72b3View commit details -
chore(deps): update dependency polly to 8.6.6 (#5084)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for 2f21ef6 - Browse repository at this point
Copy the full SHA 2f21ef6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 701964b - Browse repository at this point
Copy the full SHA 701964bView commit details
Commits on Mar 5, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 821866c - Browse repository at this point
Copy the full SHA 821866cView commit details -
chore(deps): update dependency humanizer to 3.0.8 (#5087)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for acfe0f3 - Browse repository at this point
Copy the full SHA acfe0f3View commit details
Commits on Mar 6, 2026
-
chore(deps): update dependency polyfill to 9.18.0 (#5090)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for 7a70ea4 - Browse repository at this point
Copy the full SHA 7a70ea4View commit details -
chore(deps): update dependency polyfill to 9.18.0 (#5089)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for 63d4002 - Browse repository at this point
Copy the full SHA 63d4002View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2fe560 - Browse repository at this point
Copy the full SHA c2fe560View commit details -
fix(mocks): escape C# keyword parameter names in generated mock code (#…
…5091) * fix(mocks): escape C# keyword parameter names in generated mock code IParameterSymbol.Name in Roslyn returns keyword names without the '@' prefix (e.g. '@event' -> 'event'). The source generator was emitting these raw keywords as identifiers, producing uncompilable code like 'string event', 'event.Matcher', 'int class', etc. Fix: use SyntaxFacts.IsKeywordKind to detect reserved words and prepend '@' when storing MockParameterModel.Name. Also strip '@' in the two places that use the name as part of a larger identifier: ToPascalCase (for SetsOut/SetsRef method names) and the __fa_ temp variable prefix. Fixes #5083 * fix: address code review feedback for keyword parameter escaping - Fix doc comment placement: EscapeIdentifier was splitting GetSpanElementType's doc comment - Simplify EscapeIdentifier to expression-bodied with direct SyntaxKind.None check - Replace TrimStart('@') with StartsWith("@") for precise single-prefix stripping
Configuration menu - View commit details
-
Copy full SHA for 028ff85 - Browse repository at this point
Copy the full SHA 028ff85View commit details -
Support static abstract interface members in mock generation (#5070)
* support static abstract interface members in mock generation (#5069) Generate explicit interface implementation stubs for static abstract members (throwing NotSupportedException) so mock classes compile when the mocked interface has static abstract members (e.g. AWS SDK interfaces). Also skip transitive mock factory generation for interfaces that contain static abstract members, avoiding CS8920 when they're used as type args. * simplify: extract shared helpers, fix dedup key, reduce duplication - Fix correctness bug: add ref-kind to static abstract member dedup key (consistent with GetMethodKey for regular members) - Extract FormatParameterList, FormatTypeParameterList, FormatConstraintClauses helpers to eliminate duplication with GenerateStaticAbstractStub - Extract GenerateStaticAbstractStubs to deduplicate triplicated loop - Remove unnecessary ToDisplayString call for unused Type field - Add TypeParameters to MockStaticAbstractMemberModel.GetHashCode * fix CI: consistent pack versions and nuget tester file locks - PackTUnitFilesModule: rebuild solution with pack version before packing to prevent CS1705 assembly version mismatches on PR branches where MinVer computes a different version than GenerateVersionModule - TestNugetPackageModule: add [NotInParallel] to prevent concurrent builds of shared TUnit.NugetTester.Library causing CS2012 file lock errors on Windows * address PR review: fix hardcoded indentation, remove unused imports - Use writer.OpenBrace/CloseBrace instead of hardcoded spaces in GenerateStaticAbstractStub (MockImplBuilder.cs) - Remove unused System.Collections.Immutable and System.Linq imports from MockStaticAbstractMemberModel.cs * make static abstract interface members fully configurable via bridge interface Static abstract members now support setup (Returns/Throws/Callback), verification (WasCalled), and property getter/setter configuration using the same fluent API as instance members. Key changes: - Bridge interface (_Mockable) with DIMs resolves CS8920 for Mock<T> usage - AsyncLocal<IMockEngineAccess> bridges static context to per-test engines - [GenerateMock(typeof(T))] attribute for discovery (typeof avoids CS8920) - Static abstracts promoted to full MockMemberModel (IsStaticAbstract flag) - Removed separate MockStaticAbstractMemberModel in favor of unified model * simplify: remove dead code, deduplicate helpers, cache computed property - Delete 3 unreachable private methods in MockImplBuilder (~140 lines) - Delete unused IsGenerateMockAttribute syntax predicate - MockMembersBuilder: reuse MockImplBuilder's type parameter helpers - MockTypeModel.HasStaticAbstractMembers: stored init property instead of LINQ scan * address review: detect multiple mock instances, fix MockTypeModel equality - Add runtime guard in generated constructors that throws InvalidOperationException if a second mock of the same static-abstract interface type is created in the same test context (AsyncLocal footgun) - Extract EmitStaticEngineAssignment helper to centralize the check - Add HasStaticAbstractMembers to MockTypeModel.Equals and GetHashCode - Update snapshot files for the new constructor guard * handle static abstract events in mock generation HasStaticAbstractMembers now covers events (not just methods/properties), closing a gap where an interface with only static abstract events would not trigger bridge generation, causing CS8920. - Add IsStaticAbstract to MockEventModel - Collect static abstract events in MemberDiscovery - Include events in HasStaticAbstractMembers check - Generate no-op DIM stubs for static abstract events in bridge - Filter static abstract events from impl, raise dispatch, and extensions * fix CI: use TUnit.slnx (not TUnit.sln) in PackTUnitFilesModule The repository uses TUnit.slnx, not TUnit.sln. FindFile returned null causing ArgumentNullException, which cascaded to all downstream modules. * revert PackTUnitFilesModule to original per-project pack approach Remove the solution-level dotnet build step and NoBuild flag. Each dotnet pack call already builds its project with the correct version properties (including IsPackTarget to skip MinVer). The solution-level rebuild was unnecessary and broke CI because TUnit.sln doesn't exist (the repo uses TUnit.slnx). * merge main: resolve conflict in MockGeneratorTests Keep both the new keyword parameter names test from main and the static abstract member tests from this branch.
Configuration menu - View commit details
-
Copy full SHA for f4def00 - Browse repository at this point
Copy the full SHA f4def00View commit details -
chore(deps): update tunit to 1.18.37 (#5094)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Configuration menu - View commit details
-
Copy full SHA for 8cc6e87 - Browse repository at this point
Copy the full SHA 8cc6e87View commit details -
fix: improve CreateTestVariant API and fix void/ValueTask return types (
#5095) * fix: improve CreateTestVariant API and fix void/ValueTask return types (#5093) - Fix CreateTestVariant for void and ValueTask-returning test methods by adding proper expression tree handling (AsTask() wrapping for ValueTask) - Extract shared ExpressionHelper to eliminate 5-way code duplication across TestRegistry, AotTestDataCollector, and ReflectionTestDataCollector - Return TestVariantInfo (TestId + DisplayName) instead of Task - Add IsVariant property to ITestDependencies for infinite recursion guard - Rename 'arguments' to 'methodArguments' and add 'classArguments' parameter - Use IReadOnlyDictionary for properties parameter - Add argument count validation against method parameter count - Hoist Compile()/GetMethod("Invoke") out of per-invocation lambda - Remove async/await Task.FromResult anti-pattern in metadata creation - Replace illusory GetAttributesOptimized with List<T>.ToArray() * fix: address code review feedback - Add IsVariant guard to CreateTestVariant_FromTaskMethod and CreateTestVariant_FromValueTaskMethod to prevent infinite recursion - Add default interface implementation for IsVariant on .NET 6+ (netstandard2.0 keeps abstract member for compatibility) - Document FindMethodCall ordering assumption in ExpressionHelper * refactor: address second review round - Convert TestVariantInfo from sealed class to sealed record - Add comment explaining why CreateTestVariant bypasses the queue - Update public API snapshots for class→record change * refactor: address third review round - Move IsVariant from interface member to extension method (non-breaking) - Combine null check for _sessionId and _testBuilderPipeline - Add classArguments integration test with parameterized test class - Update public API snapshots for all 4 target frameworks * refactor: address round 4 review feedback - Use TryGetValue for StateBag.Items["AttemptNumber"] (defensive) - Add comment explaining IsForExecution: false intent * test: add Task<T> return type integration test for CreateTestVariant Covers the Convert(MethodCallExpression) expression tree path end-to-end. ValueTask<T> cannot be tested as the source generator doesn't support it. void is only reachable via AddDynamicTest, not CreateTestVariant. Both are covered by ExpressionHelper unit tests. * fix: use net472-compatible ValueTask APIs in ExpressionHelperTests ValueTask.FromResult and ValueTask.CompletedTask are .NET 5+ only. Use default(ValueTask) and new ValueTask<int>(42) instead.
Configuration menu - View commit details
-
Copy full SHA for 58fce45 - Browse repository at this point
Copy the full SHA 58fce45View commit details -
build: replace MinVer with GitVersion as single version source (#5098)
* build: replace MinVer with GitVersion as single version source Replace the dual MinVer/GitVersion versioning system with GitVersion.MsBuild as the single source of truth for all builds. This eliminates the CI race condition where pack and test builds produced different AssemblyVersions, causing CS1705 errors with strong-named assemblies. Changes: - Replace MinVer GlobalPackageReference with GitVersion.MsBuild 6.6.0 - Remove MinVerTagPrefix, MinVerSkip, and IsPackTarget properties - Remove SetAssemblyVersionFromMinVer target from Library.targets - Remove IsPackTarget condition from TUnit.Engine.csproj - Simplify PackTUnitFilesModule to only override PackageVersion for beta packages - Disable GitVersion code generation in Pipeline project (name conflict with ModularPipelines) - Update gitversion.tool to 6.6.0 +semver:minor commit messages now work out of the box via GitVersion's ContinuousDeployment mode with Mainline strategy. * fix: resolve CI failures from GitVersion.MsBuild migration - Disable GenerateGitVersionInformation globally (avoids generated class conflicting with snapshot tests and ModularPipelines type names) - Add fetch-depth: 0 to cloudshop-example.yml and codeql.yml workflows (GitVersion requires full git history, not shallow clones) - Remove redundant per-project GenerateGitVersionInformation from TUnit.Pipeline * fix: scrub version numbers in source generator snapshot tests The GeneratedCode attribute includes the assembly version, which changes with every build when using GitVersion. Add version scrubbing to prevent snapshot tests from breaking on version changes. * fix: pass PackageVersion for all packages in PackTUnitFilesModule GitVersion.MsBuild and the GitVersion CLI can produce different versions on PR branches (e.g., different pre-release labels). The pipeline reads the version from the CLI (GenerateVersionModule) for downstream operations like template install and nuget test. The .nupkg must use the same version.
Configuration menu - View commit details
-
Copy full SHA for d66766a - Browse repository at this point
Copy the full SHA d66766aView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.18.21...v1.19.0