Skip to content

Commit

Permalink
Added a test case for foundry MIB documents.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Aug 13, 2016
1 parent 1f0a5d2 commit e27e046
Show file tree
Hide file tree
Showing 3 changed files with 7,230 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Tests.NUnit/Mib/Tests/ObjectRegistryTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,28 @@ public void TestObjectIdentifierAssignments()
// IMPORTANT: since no more assistant OIDs exists, the textual form is now unique.
Assert.AreEqual(1, definition.TextualForms.Count);
}

[Test]
public void TestFoundry()
{
var registry = new SimpleObjectRegistry();
var collector = new ErrorRegistry();
registry.Tree.Collector = collector;
registry.Import(Parser.Compile(GetLocation("SNMPv2-SMI.txt"), collector));
registry.Import(Parser.Compile(GetLocation("SNMPv2-CONF.txt"), collector));
registry.Import(Parser.Compile(GetLocation("SNMPv2-TC.txt"), collector));
registry.Import(Parser.Compile(GetLocation("SNMPv2-MIB.txt"), collector));
registry.Import(Parser.Compile(GetLocation("IF-MIB.txt"), collector));
registry.Import(Parser.Compile(GetLocation("IANAifType-MIB.txt"), collector));
registry.Import(Parser.Compile(GetLocation("INET-ADDRESS-MIB.txt"), collector));
registry.Import(Parser.Compile(GetLocation("HCNUM-TC.txt"), collector));
registry.Import(Parser.Compile(GetLocation("FOUNDRY-SN-ROOT-MIB.txt"), collector));
registry.Import(Parser.Compile(GetLocation("FOUNDRY-SN-AGENT-MIB.txt"), collector));
registry.Refresh();

Assert.AreEqual(0, collector.Errors.Count);
}

// ReSharper restore InconsistentNaming

[Test]
Expand Down
Loading

0 comments on commit e27e046

Please sign in to comment.