0

I have been asked to write some test procedures with the aim to provide feedbacks about the SharpsnmpLib.In particular i have been asked about some classes, methods and interfaces (included also constructors) and my test cases/procedures should cover all the items indicated with the request that the library has to be seen as a black box.Beside the particularity of the request (not having requirements but only classes and methods to test and it is not a unit test), what i found useful to do in order to go out from this situation, also because i did not get much time to do this test, is to use your C# code examples,so the snmpd, snmpsendtrap, snmpdiscover to simulate for example the engine.start engine.stop,listener.clear bindings.also because i am an not a network expert and i dont write code since many years and i needed to read about SNMP protocol before starting the task.Now, in the list of the items that i got there is also the ExceptionEventArgs (get_Exception) which i did not understand and i should simulate a case in which this exception is raised.Having your code examples how is it possible to simulate an event that raises this kind of Exception? What should happen that raises this exception? I am a bit confused

Since i am here , i should also provide feedback about the Messenger.GetTable which i understand is used to do a get operation when a tabular OID is given.On a windows intranet, a tabular OID that can be given as input to the GetTable is the sys.SysOrTable, but when i try to access it i get an error in response, as if the sys.SysOrTable is not there or not accessible.How can i provide a test of the Messenger.GetTable using the sys.SysOrTable? Thanks in advance for your help

  • http://blog.lextudio.com/2013/03/tritonmate-words-iftable-implementation/ waw i found this link that is helpful for the second question( related to the sysORTable) – Programmer_Rox Feb 22 '14 at 22:40
  • `Messenger.GetTable` is obsolete, so I won't answer about it. – Lex Li Feb 26 '14 at 14:34

1 Answers1

0

To trigger exception handling, you need to fake raw UDP packets and send to the port where Listener listens to. This can be easily done via Socket class in .NET Framework.

Lex Li
  • 60,503
  • 9
  • 116
  • 147