public void DisposeTest002() { DjvuDocument document = null; int pageCount = 0; try { document = Util.GetTestDocument(2, out pageCount); } finally { document.Dispose(); Assert.True(document.IsDisposed); Assert.Empty(document.Pages); // Test call to Dispose does not throw document.Dispose(); } }
public void DisposeTest001() { DjvuDocument document = null; int pageCount = 0; try { document = Util.GetTestDocument(2, out pageCount); } finally { document?.Dispose(); Assert.True(document.IsDisposed); Assert.Empty(document.Pages); } }
public void LoadTest002() { DjvuDocument document = null; document = new DjvuDocument(); string testFile = Util.GetTestFilePath(2); try { document.Load(testFile); Assert.NotNull(document.Pages); Assert.NotEmpty(document.Pages); } finally { document?.Dispose(); } }
public void ctor_Theory(string filePath, int pageCount) { DjvuDocument document = null; try { document = new DjvuDocument(filePath); Util.VerifyDjvuDocumentCtor(pageCount, document); } catch (Exception error) { Util.FailOnException(error, $"\nDjvuDocument_ctor failed. File: {filePath}, Page count: {pageCount}"); } finally { document?.Dispose(); } }