I'm trying to mock a static class and static method in C# using NSubstitute. I obviously don't want to Generate an excel file for every unit test. So I definitely want to mock. But since this is a static class, I'm unable to mock as this is a static class.
public static class FileGenerator
{
public static async Task GenerateExcelFile(string filename, IEnumerable<T> content)
{
.....
}
}
var mockobj = Substitute.For<FileGenerator>(); // Returns error
Any hint?