Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: update snapshot for InheritedTestsFromDifferentProjectTests
The source generator fix for MethodDataSource<T> now correctly resolves
the target type and generates Factory-based code, changing the output
for this existing test.
  • Loading branch information
thomhurst committed Mar 11, 2026
commit 993cb7a4019bbd34119d969dfb3773d674cd58f2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <auto-generated/>
// <auto-generated/>
#pragma warning disable

#nullable enable
Expand Down Expand Up @@ -36,7 +36,18 @@ internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_
}),
dataSources: new global::TUnit.Core.IDataSourceAttribute[]
{
new global::TUnit.Core.MethodDataSourceAttribute<global::TUnit.TestProject.TestData>("Foo"),
new global::TUnit.Core.MethodDataSourceAttribute("Foo")
{
Factory = (dataGeneratorMetadata) =>
{
async global::System.Collections.Generic.IAsyncEnumerable<global::System.Func<global::System.Threading.Tasks.Task<object?[]?>>> Factory()
{
var result = global::TUnit.TestProject.TestData.Foo();
yield return () => global::System.Threading.Tasks.Task.FromResult(global::TUnit.Core.Helpers.DataSourceHelpers.ToObjectArray(result));
}
return Factory();
}
},
},
testSessionId: testSessionId
);
Expand Down Expand Up @@ -253,7 +264,18 @@ internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_
}),
dataSources: new global::TUnit.Core.IDataSourceAttribute[]
{
new global::TUnit.Core.MethodDataSourceAttribute<global::TUnit.TestProject.TestData>("Foo"),
new global::TUnit.Core.MethodDataSourceAttribute("Foo")
{
Factory = (dataGeneratorMetadata) =>
{
async global::System.Collections.Generic.IAsyncEnumerable<global::System.Func<global::System.Threading.Tasks.Task<object?[]?>>> Factory()
{
var result = global::TUnit.TestProject.TestData.Foo();
yield return () => global::System.Threading.Tasks.Task.FromResult(global::TUnit.Core.Helpers.DataSourceHelpers.ToObjectArray(result));
}
return Factory();
}
},
},
testSessionId: testSessionId
);
Expand Down
Loading