I have a static class that wraps some native methods from winspool:
public static class WinSpool
{
[DllImport("winspool.drv")]
public static extern int OpenPrinter(string pPrinterName, out IntPtr phPrinter, IntPtr pDefault);
...
//some more methods here
}
I would like to mock them for unit testing, but couldn't find a pattern for this. (Does everyone avoid static classes?)