Skip to content

Commit 5439c07

Browse files
committed
Make ExplicitDestinationType a byte a fix CanCreateDocumentWithOutline() failing test
1 parent b8bd40e commit 5439c07

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/UglyToad.PdfPig.Tests/Writer/PdfDocumentBuilderTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,18 +1252,18 @@ public void CanCreateDocumentWithOutline()
12521252
bookmarks.GetNodes().OfType<UriBookmarkNode>().Select(node => node.Uri));
12531253

12541254
Assert.Equal(
1255-
new[]
1255+
new byte[]
12561256
{
1257-
ExplicitDestinationType.XyzCoordinates,
1258-
ExplicitDestinationType.FitPage,
1259-
ExplicitDestinationType.FitRectangle,
1260-
ExplicitDestinationType.FitBoundingBox,
1261-
ExplicitDestinationType.FitBoundingBoxHorizontally,
1262-
ExplicitDestinationType.FitBoundingBoxVertically,
1263-
ExplicitDestinationType.FitHorizontally,
1264-
ExplicitDestinationType.FitVertically,
1257+
(byte)ExplicitDestinationType.XyzCoordinates,
1258+
(byte)ExplicitDestinationType.FitPage,
1259+
(byte)ExplicitDestinationType.FitRectangle,
1260+
(byte)ExplicitDestinationType.FitBoundingBox,
1261+
(byte)ExplicitDestinationType.FitBoundingBoxHorizontally,
1262+
(byte)ExplicitDestinationType.FitBoundingBoxVertically,
1263+
(byte)ExplicitDestinationType.FitHorizontally,
1264+
(byte)ExplicitDestinationType.FitVertically,
12651265
},
1266-
bookmarks.GetNodes().OfType<DocumentBookmarkNode>().Select(node => node.Destination.Type));
1266+
bookmarks.GetNodes().OfType<DocumentBookmarkNode>().Select(node => (byte)node.Destination.Type));
12671267
}
12681268
}
12691269

src/UglyToad.PdfPig/Outline/Destinations/ExplicitDestinationType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/// <summary>
44
/// The display type for opening an <see cref="ExplicitDestination"/>.
55
/// </summary>
6-
public enum ExplicitDestinationType
6+
public enum ExplicitDestinationType : byte
77
{
88
/// <summary>
99
/// Display the page with the given top left coordinates and

0 commit comments

Comments
 (0)