Example #1
0
        public void SetUp()
        {
            _fileWrap = Substitute.For <IFile>();
            _fileWrap.Exists(Arg.Any <string>()).Returns(true);

            _outputDevice       = ParametersTestHelper.GenerateDevice(OutputFormat.Pdf, _fileWrap);
            _ghostscriptVersion = ParametersTestHelper.GhostscriptVersionDummie;
        }
Example #2
0
        public void SetUp()
        {
            _printerStub = MockRepository.GenerateStub <PrinterWrapper>(); // TODO Use NSubstitute and Interface

            var jobStub = ParametersTestHelper.GenerateJobStub(OutputFormat.Txt);

            jobStub.OutputFiles = new List <string>();
            jobStub.OutputFiles.Add(TestFileDummie);

            var fileStub = MockRepository.GenerateStub <IFile>();

            var osHelperStub = MockRepository.GenerateStub <IOsHelper>();

            osHelperStub.Stub(x => x.WindowsFontsFolder).Return(ParametersTestHelper.WindowsFontsFolderDummie);

            var commandLineUtilStub = MockRepository.GenerateStub <ICommandLineUtil>();

            _printingDevice = new PrintingDevice(jobStub, _printerStub, fileStub, osHelperStub, commandLineUtilStub);
            _printingDevice.Job.OutputFiles.Add(TestFileDummie);

            _ghostscriptVersion = ParametersTestHelper.GhostscriptVersionDummie;
        }
Example #3
0
 public void CheckDeviceIndependentDefaultParameters()
 {
     _parameterStrings = new Collection <string>(_txtDevice.GetGhostScriptParameters(_ghostscriptVersion));
     ParametersTestHelper.CheckDefaultParameters(_parameterStrings);
 }
Example #4
0
 public void SetUp()
 {
     _txtDevice          = ParametersTestHelper.GenerateDevice(OutputFormat.Txt);
     _ghostscriptVersion = ParametersTestHelper.GhostscriptVersionDummie;
 }