Is it possible to mock the printer during unittests? I want to all the usual stuff except the actual printing and that seems not possible because the constructor already throws an exception when the printer cannot be found.
Mock printer
Re: Mock printer
Support · Sep 7, 2009Hello,
You will have to give some printer name which is available to the system for printing. If you do not want to use an actual printer then you can also use the "Microsoft XPS Document Writer" or any other printer which can print the documents within the system.
Thanks,
ceTe Software Support Team.
Re: Mock printer
Forum member · Sep 7, 2009The problem with the XPS Document Writer is that a dialog pops up where the filename has to be entered. There are several solutions online about how to push this filename automatically to the printer but I don't know how to do this with your PrintManager in between.
Re: Mock printer
Support · Sep 7, 2009Hello,
The print manager will take the printer name and it sends the file to the respective printer. You may have to use any printer which can save the file in the system automatically without prompting for the file name.
Thanks,
ceTe Software Support Team.