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

Commit 9c72d4b

Browse files
committed
Test case for iso oids
1 parent 86bc184 commit 9c72d4b

File tree

1 file changed

+13
-0
lines changed
  • snmpman/src/test/java/com/oneandone/snmpman/configuration

1 file changed

+13
-0
lines changed

snmpman/src/test/java/com/oneandone/snmpman/configuration/WalksTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ public void readWalkWithHexStringLine() throws IOException {
8383
new OctetString(expected)));
8484
}
8585

86+
@Test
87+
public void readWalkWithIsoOid() throws IOException {
88+
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"));
89+
Map<OID, Variable> walk = Walks.readWalk(tmpFile.toFile());
90+
byte[] expected = new byte[16];
91+
for (int i = 0; i < 16; i++) {
92+
expected[i] = (byte) i;
93+
}
94+
assertEquals(walk, Collections.singletonMap(
95+
new OID(".1.3.6.1.4.1.9.9.683.1.5.0"),
96+
new OctetString(expected)));
97+
}
98+
8699
@Test
87100
public void readWalkWithTwoHexStringLine() throws IOException {
88101
Files.write(tmpFile, Arrays.asList(

0 commit comments

Comments
 (0)