public void PDFiumLibraryNotLoadedException_Message_Call_NoException()
        {
            var message = "0\r\n1\tB";
            var e       = new PDFiumLibraryNotLoadedException(message);

            Assert.AreEqual(message, e.Message);
        }
        public void PDFiumLibraryNotLoadedException_CreateException_Call_NoException()
        {
            var library      = "l-i-b-r-a-r-y";
            var number       = 5;
            var numberString = " 5 ";
            var e            = PDFiumLibraryNotLoadedException.CreateException(library, number);

#if NET48
            Assert.IsTrue(e.Message.Contains(library));
            Assert.IsTrue(e.Message.Contains(numberString));
#else
            Assert.IsTrue(e.Message.Contains(library, StringComparison.InvariantCulture));
            Assert.IsTrue(e.Message.Contains(numberString, StringComparison.InvariantCulture));
#endif
        }
        private static void LoadDll()
        {
            // Determine and load pdfium library
            _libraryName   = Environment.Is64BitProcess ? "PDFium\\x64\\pdfium.dll" : "PDFium\\x86\\pdfium.dll";
            _libraryHandle = NativeMethods.LoadLibrary(_libraryName);
            if (_libraryHandle == IntPtr.Zero)
            {
                throw PDFiumLibraryNotLoadedException.CreateException(_libraryName, Marshal.GetLastWin32Error());
            }

            // Load the functions declared in view header - fpdfview.h.
            LoadDllViewPart();

            // Load the functions declared in doc header - fpdf_doc.h.
            LoadDllDocPart();

            // Load the functions declared in text header - fpdf_text.h.
            LoadDllTextPart();

            // Load the functions declared in annot header - fpdf_annot.h.
            LoadDllAnnotPart();
        }
 public void PDFiumLibraryNotLoadedException_Constructor6_Call_NoException()
 {
     _ = new PDFiumLibraryNotLoadedException("PDFiumLibraryNotLoadedException", new PDFiumLibraryNotLoadedException("message"));
 }
 public void PDFiumLibraryNotLoadedException_Constructor5_Call_NoException()
 {
     _ = new PDFiumLibraryNotLoadedException("PDFiumLibraryNotLoadedException", null);
 }
 public void PDFiumLibraryNotLoadedException_Constructor3_Call_NoException()
 {
     _ = new PDFiumLibraryNotLoadedException(string.Empty);
 }
 public void PDFiumLibraryNotLoadedException_Constructor1_Call_NoException()
 {
     _ = new PDFiumLibraryNotLoadedException();
 }