public void PDFiumFunctionNotFoundException_Message_Call_NoException() { var message = "0\r\n1\tB"; var e = new PDFiumFunctionNotFoundException(message); Assert.AreEqual(message, e.Message); }
private static T GetPDFiumFunction <T>(string functionName) { var address = NativeMethods.GetProcAddressAnsi(_libraryHandle, functionName); if (address == IntPtr.Zero) { throw PDFiumFunctionNotFoundException.CreateException(_libraryName, functionName, Marshal.GetLastWin32Error()); } return(Marshal.GetDelegateForFunctionPointer <T>(address)); }
public void PDFiumFunctionNotFoundException_CreateException_Call_NoException() { var library = "l-i-b-r-a-r-y"; var function = "f-u-n-c-t-i-o-n"; var number = 5; var numberString = " 5 "; var e = PDFiumFunctionNotFoundException.CreateException(library, function, number); #if NET48 Assert.IsTrue(e.Message.Contains(library)); Assert.IsTrue(e.Message.Contains(function)); Assert.IsTrue(e.Message.Contains(numberString)); #else Assert.IsTrue(e.Message.Contains(library, StringComparison.InvariantCulture)); Assert.IsTrue(e.Message.Contains(function, StringComparison.InvariantCulture)); Assert.IsTrue(e.Message.Contains(numberString, StringComparison.InvariantCulture)); #endif }
public void PDFiumFunctionNotFoundException_Constructor6_Call_NoException() { _ = new PDFiumFunctionNotFoundException("PDFiumFunctionNotFoundException", new PDFiumFunctionNotFoundException("message")); }
public void PDFiumFunctionNotFoundException_Constructor5_Call_NoException() { _ = new PDFiumFunctionNotFoundException("PDFiumFunctionNotFoundException", null); }
public void PDFiumFunctionNotFoundException_Constructor3_Call_NoException() { _ = new PDFiumFunctionNotFoundException(string.Empty); }
public void PDFiumFunctionNotFoundException_Constructor1_Call_NoException() { _ = new PDFiumFunctionNotFoundException(); }