org.opennms.core.test.snmp
Class JUnitSnmpAgentExecutionListener

java.lang.Object
  extended by org.springframework.test.context.support.AbstractTestExecutionListener
      extended by org.opennms.core.test.snmp.JUnitSnmpAgentExecutionListener
All Implemented Interfaces:
org.springframework.test.context.TestExecutionListener

public class JUnitSnmpAgentExecutionListener
extends org.springframework.test.context.support.AbstractTestExecutionListener

This TestExecutionListener looks for the JUnitSnmpAgent annotation and uses attributes on it to launch a mock SNMP agent for use during unit testing.


Constructor Summary
JUnitSnmpAgentExecutionListener()
           
 
Method Summary
 void afterTestMethod(org.springframework.test.context.TestContext testContext)
           
 void beforeTestMethod(org.springframework.test.context.TestContext testContext)
           
 
Methods inherited from class org.springframework.test.context.support.AbstractTestExecutionListener
afterTestClass, beforeTestClass, prepareTestInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitSnmpAgentExecutionListener

public JUnitSnmpAgentExecutionListener()
Method Detail

beforeTestMethod

public void beforeTestMethod(org.springframework.test.context.TestContext testContext)
                      throws Exception
Specified by:
beforeTestMethod in interface org.springframework.test.context.TestExecutionListener
Overrides:
beforeTestMethod in class org.springframework.test.context.support.AbstractTestExecutionListener
Throws:
Exception

afterTestMethod

public void afterTestMethod(org.springframework.test.context.TestContext testContext)
                     throws Exception
Specified by:
afterTestMethod in interface org.springframework.test.context.TestExecutionListener
Overrides:
afterTestMethod in class org.springframework.test.context.support.AbstractTestExecutionListener
Throws:
Exception


Copyright © 2011. All Rights Reserved.