Exemplo n.º 1
0
        public void FileHasTiffAsExtensionType_PrintReturnsTrue()
        {
            var specialCommandArguments = Environment.SystemDirectory + "\\shimgvw.dll,imageview_printto";
            var testFile     = TempFileHelper.CreateTempFile("PicturePrintFallbackTest", "test.tiff");
            var fileAssoc    = new FileAssoc();
            var printCommand = new PrintCommand(testFile, "SomePrinter", fileAssoc, _printerHelper, _timeOut);

            var fileIsPrintable = printCommand.Print();
            var shellCommand    = fileAssoc.GetShellCommand(Path.GetExtension(testFile), "printto");

            Assert.AreEqual(specialCommandArguments.ToUpper(), shellCommand.Arguments[0].ToUpper());
            Assert.IsTrue(fileIsPrintable);
        }
 public void SetUp()
 {
     _fileAssoc = new FileAssoc();
 }