org.mactor.framework
Class TestContextImpl
java.lang.Object
org.mactor.framework.TestContextImpl
- All Implemented Interfaces:
- TestContext
public class TestContextImpl
- extends java.lang.Object
- implements TestContext
Maintains context information about the current executing test
- Author:
- Lars Ivar Almli
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestContextImpl
public TestContextImpl(GlobalConfig globalConfig,
TestSpec testSpec)
setValues
public void setValues(java.util.Map<java.lang.String,java.lang.String> nameValueMap)
setValue
public void setValue(java.lang.String name,
java.lang.String value)
getValue
public java.lang.Object getValue(java.lang.String name)
getValues
public java.util.Map<java.lang.String,java.lang.String> getValues()
- Specified by:
getValues
in interface TestContext
addReceivedMessage
public void addReceivedMessage(java.lang.String nodeName,
Message message)
addOutgoingMessage
public void addOutgoingMessage(java.lang.String nodeName,
Message message)
getLastIncomingMessage
public Message getLastIncomingMessage()
- Specified by:
getLastIncomingMessage
in interface TestContext
getLastOutgoingMessage
public Message getLastOutgoingMessage()
- Specified by:
getLastOutgoingMessage
in interface TestContext
getIncomingMessageHistory
public java.util.List<Message> getIncomingMessageHistory(java.lang.String nodeName)
- Specified by:
getIncomingMessageHistory
in interface TestContext
getOutgoingMessageHistory
public java.util.List<Message> getOutgoingMessageHistory(java.lang.String nodeName)
- Specified by:
getOutgoingMessageHistory
in interface TestContext
getIncomingMessageHistoryForCurrentNode
public java.util.List<Message> getIncomingMessageHistoryForCurrentNode()
- Specified by:
getIncomingMessageHistoryForCurrentNode
in interface TestContext
getOutgoingMessageHistoryForCurrentNode
public java.util.List<Message> getOutgoingMessageHistoryForCurrentNode()
- Specified by:
getOutgoingMessageHistoryForCurrentNode
in interface TestContext
substitute
public java.util.List<java.lang.String> substitute(java.util.List<java.lang.String> candidates)
getSpecNode
public SpecNode getSpecNode(java.lang.String nodeName)
- Specified by:
getSpecNode
in interface TestContext
substitute
public java.lang.String substitute(java.lang.String candidate)
getGlobalConfig
public GlobalConfig getGlobalConfig()
- Specified by:
getGlobalConfig
in interface TestContext
getGlobalConfigValue
public java.lang.String getGlobalConfigValue(java.lang.String valueName)
- Specified by:
getGlobalConfigValue
in interface TestContext
getGlobalConfigGroup
public GlobalConfig.Group getGlobalConfigGroup(java.lang.String groupName)
getRequieredGlobalConfigGroup
public GlobalConfig.Group getRequieredGlobalConfigGroup(java.lang.String groupName)
throws ConfigException
- Throws:
ConfigException
getAllMessages
public java.util.LinkedList<Message> getAllMessages()
- Specified by:
getAllMessages
in interface TestContext
getTestSpec
public TestSpec getTestSpec()
Copyright © 2008. All Rights Reserved.