Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
Test case for iso oids
Browse files Browse the repository at this point in the history
  • Loading branch information
sfuhrm committed Jan 8, 2024
1 parent 86bc184 commit 9c72d4b
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ public void readWalkWithHexStringLine() throws IOException {
new OctetString(expected)));
}

@Test
public void readWalkWithIsoOid() throws IOException {
Files.write(tmpFile, Collections.singletonList("iso.3.6.1.4.1.9.9.683.1.5.0 = Hex-STRING: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f"));
Map<OID, Variable> walk = Walks.readWalk(tmpFile.toFile());
byte[] expected = new byte[16];
for (int i = 0; i < 16; i++) {
expected[i] = (byte) i;
}
assertEquals(walk, Collections.singletonMap(
new OID(".1.3.6.1.4.1.9.9.683.1.5.0"),
new OctetString(expected)));
}

@Test
public void readWalkWithTwoHexStringLine() throws IOException {
Files.write(tmpFile, Arrays.asList(
Expand Down

0 comments on commit 9c72d4b

Please sign in to comment.