public virtual void IsWrappedObjectMustBeIndirectTest() { String somePath = "C:\\some\\path\\some-app.exe"; PdfWin win = new PdfWin(new PdfString(somePath)); NUnit.Framework.Assert.IsFalse(win.IsWrappedObjectMustBeIndirect()); }
public virtual void CheckSingleParamConstructorTest() { String somePath = "C:\\some\\path\\some-app.exe"; PdfWin win = new PdfWin(new PdfString(somePath)); PdfDictionary pdfWinObj = win.GetPdfObject(); NUnit.Framework.Assert.AreEqual(1, pdfWinObj.Size()); NUnit.Framework.Assert.AreEqual(somePath, pdfWinObj.GetAsString(PdfName.F).ToString()); }
public virtual void CheckMultipleParamConstructorTest() { String somePath = "C:\\some\\path\\some-app.exe"; String defaultDirectory = "C:\\temp"; String operation = "open"; String parameter = "param"; PdfWin win = new PdfWin(new PdfString(somePath), new PdfString(defaultDirectory), new PdfString(operation) , new PdfString(parameter)); PdfDictionary pdfWinObj = win.GetPdfObject(); NUnit.Framework.Assert.AreEqual(4, pdfWinObj.Size()); NUnit.Framework.Assert.AreEqual(somePath, pdfWinObj.GetAsString(PdfName.F).ToString()); NUnit.Framework.Assert.AreEqual(defaultDirectory, pdfWinObj.GetAsString(PdfName.D).ToString()); NUnit.Framework.Assert.AreEqual(operation, pdfWinObj.GetAsString(PdfName.O).ToString()); NUnit.Framework.Assert.AreEqual(parameter, pdfWinObj.GetAsString(PdfName.P).ToString()); }
public static iText.Kernel.Pdf.Action.PdfAction CreateLaunch(PdfFileSpec fileSpec, PdfWin win, bool newWindow ) { iText.Kernel.Pdf.Action.PdfAction action = new iText.Kernel.Pdf.Action.PdfAction().Put(PdfName.S, PdfName. Launch).Put(PdfName.NewWindow, new PdfBoolean(newWindow)); if (fileSpec != null) { action.Put(PdfName.F, fileSpec.GetPdfObject()); } if (win != null) { action.Put(PdfName.Win, win.GetPdfObject()); } return(action); }