I am writing a number of unit tests for a logger class I created and I want to simulate the file class. I can't find the interface that I need to use to create the MOQ... so how do you successfully MOQ a class without an interface?
It also isn't clear to me how I can use dependency injection without having an interface available:
private FileInfo _logFile;
public LogEventProcessorTextFile(FileInfo logFile) {
_logFile = logFile;
}
When I really want to do something like this (note IFileInfo instead of FileInfo):
private IFileInfo _logFile;
public LogEventProcessorTextFile(IFileInfo logFile) {
_logFile = logFile;
}