Package org.opennms.core.test.snmp
Class JUnitSnmpAgentExecutionListener
- java.lang.Object
-
- org.springframework.test.context.support.AbstractTestExecutionListener
-
- org.opennms.core.test.snmp.JUnitSnmpAgentExecutionListener
-
- All Implemented Interfaces:
org.springframework.core.Ordered
,org.springframework.test.context.TestExecutionListener
public class JUnitSnmpAgentExecutionListener extends org.springframework.test.context.support.AbstractTestExecutionListener
ThisTestExecutionListener
looks for theJUnitSnmpAgent
annotation and uses attributes on it to launch a mock SNMP agent for use during unit testing.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IPADDRESS_KEY
static java.lang.String
PORT_KEY
-
Constructor Summary
Constructors Constructor Description JUnitSnmpAgentExecutionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterTestMethod(org.springframework.test.context.TestContext testContext)
void
beforeTestMethod(org.springframework.test.context.TestContext testContext)
-
-
-
Field Detail
-
IPADDRESS_KEY
public static final java.lang.String IPADDRESS_KEY
- See Also:
- Constant Field Values
-
PORT_KEY
public static final java.lang.String PORT_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
beforeTestMethod
public void beforeTestMethod(org.springframework.test.context.TestContext testContext) throws java.lang.Exception
- Specified by:
beforeTestMethod
in interfaceorg.springframework.test.context.TestExecutionListener
- Overrides:
beforeTestMethod
in classorg.springframework.test.context.support.AbstractTestExecutionListener
- Throws:
java.lang.Exception
-
afterTestMethod
public void afterTestMethod(org.springframework.test.context.TestContext testContext) throws java.lang.Exception
- Specified by:
afterTestMethod
in interfaceorg.springframework.test.context.TestExecutionListener
- Overrides:
afterTestMethod
in classorg.springframework.test.context.support.AbstractTestExecutionListener
- Throws:
java.lang.Exception
-
-