'Moq Class library

I'm trying to find an appropriate way to Moq this, and I'm unsure on how to do it.This is a .Net Standard 2.0 library that must be consumed from .net 4.8, and .net core 3+.

Here is an Example.

private ILogService _logService;

public class Logger() :IProjectLogger
{
   _logService = new LogService();
}

When testing Logger(), I would like to Moq the ILogService methods. But since this may not always be used with dependency injection, and I don't want the client to have to inject ILogService, I'm stuck on how to moq ILogService methods when testing Logger()

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source