Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
26 changes: 26 additions & 0 deletions TUnit.Mocks.SourceGenerator.Tests/MockGeneratorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,4 +415,30 @@ void M()

return VerifyGeneratorOutput(source);
}

[Test]
public Task Interface_With_Nullable_Reference_Type_Parameters()
{
var source = """
using TUnit.Mocks;

public interface IFoo
{
void Bar(object? baz);
string? GetValue(string? key, int count);
void Process(string nonNull, string? nullable, object? obj);
string? NullableProp { get; set; }
}

public class TestUsage
{
void M()
{
var mock = Mock.Of<IFoo>();
}
}
""";

return VerifyGeneratorOutput(source);
}
}
Loading
Loading