Describe the bug
If the type given to any of the mock methods has a nullable type in it, the file name (hintName) has a ? in it, and it can't have that character. Probably just need to replace it with the word null.
Note: this will get fixed with #274.
To Reproduce
public static async Task GenerateWhenNullableIsInTypeAsync()
{
var code =
"""
using Rocks;
using System;
#nullable enable
public interface IType<T>
{
void Foo(T value);
}
public static class Test
{
public static void Generate()
{
var rock = Rock.Create<IType<int?>>();
}
}
""";
var generatedCode = // Gen'd code goes here.;
await TestAssistants.RunAsync<RockCreateGenerator>(code,
new[] { (typeof(RockCreateGenerator), "ITypeint?_Rock_Create.g.cs", generatedCode) },
Enumerable.Empty<DiagnosticResult>()).ConfigureAwait(false);
}
Expected behavior
The test passes.
Describe the bug
If the type given to any of the mock methods has a nullable type in it, the file name (
hintName) has a?in it, and it can't have that character. Probably just need to replace it with the wordnull.Note: this will get fixed with #274.
To Reproduce
Expected behavior
The test passes.