|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.eclipse.soda.dk.device.testcase.DeviceTestcase
public abstract class DeviceTestcase
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_NAME
Defines the class name. |
protected CommandService |
commandReceived
Define the command received (CommandService) field. |
protected java.lang.Object |
commandReceivedData
Define the command received data (Object) field. |
protected java.lang.Object |
commandWait
Define the command wait (Object) field. |
protected DeviceService |
device
Define the device (DeviceService) field. |
protected MeasurementService |
measurementReceived
Define the measurement received (MeasurementService) field. |
protected java.lang.Object |
measurementReceivedData
Define the measurement received data (Object) field. |
protected java.lang.Object |
measurementWait
Define the measurement wait (Object) field. |
protected static int |
MESSAGE_KEY_NOT_NUMBER_RESOURCE
Define the message key not number resource (int) constant. |
protected MessageService |
messageReceived
Define the message received (MessageService) field. |
protected java.lang.Object |
messageReceivedWait
Define the message received wait (Object) field. |
protected MessageService |
responseMessage
Define the response message (MessageService) field. |
protected SignalService |
signalReceived
Define the signal received (SignalService) field. |
protected java.lang.Object |
signalReceivedData
Define the signal received data (Object) field. |
protected java.lang.Object |
signalWait
Define the signal wait (Object) field. |
protected java.lang.Object |
stateWait
Define the state wait (Object) field. |
protected TransportService |
transport
Define the transport (TestTransport) field. |
| Fields inherited from interface org.eclipse.soda.dk.device.service.DeviceListener |
|---|
ADDED, CHANGED, REMOVED |
| Constructor Summary | |
|---|---|
DeviceTestcase()
Constructs a new instance of the DeviceTestcase class. |
|
DeviceTestcase(java.lang.String name)
Constructs an instance of this class from the specified name parameter. |
|
| Method Summary | |
|---|---|
void |
commandExecuted(CommandService source,
java.lang.Object timestamp,
java.lang.Object data)
Command executed with the specified source, timestamp and data parameters. |
void |
controlChanged(DeviceService device,
java.lang.Object timestamp,
ControlService control,
int code)
Control changed with the specified device, timestamp, control and code parameters. |
abstract DeviceService |
createDevice()
Create device and return the DeviceService result. |
TransportService |
createTransport()
Create transport and return the TransportService result. |
void |
deviceChanged(DeviceService source,
java.lang.Object timestamp,
int newState,
int oldState)
Device changed with the specified source, timestamp, new state and old state parameters. |
void |
errorOccurred(java.lang.Object source,
java.lang.Object timestamp,
java.lang.Object data)
Error occurred with the specified source, timestamp and data parameters. |
CommandService |
getCommandReceived()
Gets the command received (CommandService) value. |
java.lang.Object |
getCommandReceivedData()
Gets the command received data (Object) value. |
java.lang.Object |
getCommandWait()
Gets the command wait (Object) value. |
DeviceService |
getDevice()
Gets the device (DeviceService) value. |
MeasurementService |
getMeasurementReceived()
Gets the measurement received (MeasurementService) value. |
java.lang.Object |
getMeasurementReceivedData()
Gets the measurement received data (Object) value. |
java.lang.Object |
getMeasurementWait()
Gets the measurement wait (Object) value. |
java.lang.Object |
getMessageKey(MessageService message)
Get message key with the specified message parameter and return the Object result. |
MessageService |
getMessageReceived()
Gets the message received (MessageService) value. |
java.lang.Object |
getMessageReceivedWait()
Gets the message received wait (Object) value. |
java.lang.String |
getResource(int resourceId)
Gets the string resource using the supplied resourceId. |
MessageService |
getResponseMessage()
Gets the response message (MessageService) value. |
SignalService |
getSignalReceived()
Gets the signal received (SignalService) value. |
java.lang.Object |
getSignalReceivedData()
Gets the signal received data (Object) value. |
java.lang.Object |
getSignalWait()
Gets the signal wait (Object) value. |
java.lang.Object |
getStateWait()
Gets the state wait (Object) value. |
TransportService |
getTransport()
Gets the transport (TransportService) value. |
void |
measurementChanged(MeasurementService source,
java.lang.Object timestamp,
java.lang.Object newValue,
java.lang.Object oldValue)
Measurement changed with the specified source, timestamp, new value and old value parameters. |
void |
messageReceived(TransportService transportService,
java.lang.Object timestamp,
MessageService message)
Message received with the specified transport service, timestamp and message parameters. |
void |
printTable(java.util.Hashtable table,
int messageCapacity)
Print table with the specified table parameter. |
int |
registerMessageHandler(MessageService message,
java.util.Dictionary messageHandlers)
Register message handler with the specified message and message handlers parameters. |
void |
setCommandReceived(CommandService commandReceived)
Sets the command received value. |
void |
setCommandReceivedData(java.lang.Object commandReceivedData)
Sets the command received data value. |
void |
setDevice(DeviceService device)
Sets the device value. |
void |
setMeasurementReceived(MeasurementService measurementReceived)
Sets the measurement received value. |
void |
setMeasurementReceivedData(java.lang.Object measurementReceivedData)
Sets the measurement received data value. |
void |
setMessageReceived(MessageService messageReceived)
Sets the message received value. |
void |
setResponseMessage(MessageService responseMessage)
Sets the response message value. |
void |
setSignalReceived(SignalService signalReceived)
Sets the signal received value. |
void |
setSignalReceivedData(java.lang.Object signalReceivedData)
Sets the signal received data value. |
void |
setTransport(TransportService transport)
Sets the transport value. |
protected void |
setUp()
Set up. |
void |
signalOccurred(SignalService source,
java.lang.Object timestamp,
java.lang.Object data)
Signal occurred with the specified source, timestamp and data parameters. |
void |
startDevice()
Start device. |
protected void |
tearDown()
Tear down. |
void |
test_Fields()
Test_ fields. |
void |
test_InterestMask()
Test_ controls. |
void |
test_Interfaces()
Test_ interfaces. |
void |
test_MessageKey()
Test_ controls. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CLASS_NAME
protected static final int MESSAGE_KEY_NOT_NUMBER_RESOURCE
protected DeviceService device
protected TransportService transport
protected MessageService messageReceived
protected MessageService responseMessage
protected SignalService signalReceived
protected java.lang.Object signalReceivedData
protected CommandService commandReceived
protected java.lang.Object commandReceivedData
protected final java.lang.Object commandWait
protected MeasurementService measurementReceived
protected java.lang.Object measurementReceivedData
protected final java.lang.Object measurementWait
protected final java.lang.Object stateWait
protected final java.lang.Object messageReceivedWait
protected final java.lang.Object signalWait
| Constructor Detail |
|---|
public DeviceTestcase()
DeviceTestcase(String)public DeviceTestcase(java.lang.String name)
name - The name (String) parameter.DeviceTestcase()| Method Detail |
|---|
public void commandExecuted(CommandService source,
java.lang.Object timestamp,
java.lang.Object data)
commandExecuted in interface CommandListenersource - The source (CommandService) parameter.timestamp - The timestamp (Object) parameter.data - The data (Object) parameter.
public void controlChanged(DeviceService device,
java.lang.Object timestamp,
ControlService control,
int code)
controlChanged in interface DeviceListenercontainer - The device (DeviceService) parameter.timestamp - The timestamp (Object) parameter.control - The control (ControlService) parameter.code - The code (int) parameter.device - The device (DeviceService) parameter.deviceChanged(DeviceService,Object,int,int),
measurementChanged(MeasurementService,Object,Object,Object)public abstract DeviceService createDevice()
DeviceService) value.getDevice(),
setDevice(DeviceService),
startDevice()public TransportService createTransport()
TransportService) value.getTransport(),
setTransport(TransportService)
public void deviceChanged(DeviceService source,
java.lang.Object timestamp,
int newState,
int oldState)
deviceChanged in interface DeviceListenersource - The source (DeviceService) parameter.timestamp - The timestamp (Object) parameter.newState - The new state (int) parameter.oldState - The old state (int) parameter.controlChanged(DeviceService,Object,ControlService,int),
measurementChanged(MeasurementService,Object,Object,Object)
public void errorOccurred(java.lang.Object source,
java.lang.Object timestamp,
java.lang.Object data)
errorOccurred in interface ErrorListenersource - The source (Object) parameter.timestamp - The timestamp (Object) parameter.data - The data (Object) parameter.signalOccurred(SignalService,Object,Object)public CommandService getCommandReceived()
CommandService) value.setCommandReceived(CommandService)public java.lang.Object getCommandReceivedData()
Object) value.setCommandReceivedData(Object)public java.lang.Object getCommandWait()
Object) value.public DeviceService getDevice()
DeviceService) value.createDevice(),
setDevice(DeviceService),
startDevice()public MeasurementService getMeasurementReceived()
MeasurementService) value.setMeasurementReceived(MeasurementService)public java.lang.Object getMeasurementReceivedData()
Object) value.setMeasurementReceivedData(Object)public java.lang.Object getMeasurementWait()
Object) value.public java.lang.Object getMessageKey(MessageService message)
message - The message (MessageService) parameter.
Object) value.test_MessageKey()public MessageService getMessageReceived()
MessageService) value.setMessageReceived(MessageService)public java.lang.Object getMessageReceivedWait()
Object) value.public java.lang.String getResource(int resourceId)
resourceId - The resource id (int) parameter.
String) value.public MessageService getResponseMessage()
MessageService) value.setResponseMessage(MessageService)public SignalService getSignalReceived()
SignalService) value.setSignalReceived(SignalService)public java.lang.Object getSignalReceivedData()
Object) value.setSignalReceivedData(Object)public java.lang.Object getSignalWait()
Object) value.public java.lang.Object getStateWait()
Object) value.public TransportService getTransport()
TransportService) value.createTransport(),
setTransport(TransportService)
public void measurementChanged(MeasurementService source,
java.lang.Object timestamp,
java.lang.Object newValue,
java.lang.Object oldValue)
measurementChanged in interface MeasurementListenersource - The source (MeasurementService) parameter.timestamp - The timestamp (Object) parameter.newValue - The new value (Object) parameter.oldValue - The old value (Object) parameter.controlChanged(DeviceService,Object,ControlService,int),
deviceChanged(DeviceService,Object,int,int)
public void messageReceived(TransportService transportService,
java.lang.Object timestamp,
MessageService message)
transportService - The transport service (TransportService) parameter.timestamp - The timestamp (Object) parameter.message - The message (MessageService) parameter.getCommandReceived(),
getMeasurementReceived(),
getMessageReceived(),
getSignalReceived(),
setCommandReceived(CommandService),
setMeasurementReceived(MeasurementService),
setMessageReceived(MessageService),
setSignalReceived(SignalService)
public void printTable(java.util.Hashtable table,
int messageCapacity)
table - The table (Hashtable) parameter.messageCapacity - The message capacity (int) parameter.
public int registerMessageHandler(MessageService message,
java.util.Dictionary messageHandlers)
message - The message (MessageService) parameter.messageHandlers - The message handlers (Dictionary) parameter.
int) value.public void setCommandReceived(CommandService commandReceived)
commandReceived - The commandReceived (CommandService) parameter.getCommandReceived()public void setCommandReceivedData(java.lang.Object commandReceivedData)
commandReceivedData - The commandReceivedData (Object) parameter.getCommandReceivedData()public void setDevice(DeviceService device)
device - The device (DeviceService) parameter.createDevice(),
getDevice(),
startDevice()public void setMeasurementReceived(MeasurementService measurementReceived)
measurementReceived - The measurementReceived (MeasurementService) parameter.getMeasurementReceived()public void setMeasurementReceivedData(java.lang.Object measurementReceivedData)
measurementReceivedData - The measurementReceivedData (Object) parameter.getMeasurementReceivedData()public void setMessageReceived(MessageService messageReceived)
messageReceived - The messageReceived (MessageService) parameter.getMessageReceived()public void setResponseMessage(MessageService responseMessage)
responseMessage - The responseMessage (MessageService) parameter.getResponseMessage()public void setSignalReceived(SignalService signalReceived)
signalReceived - The signalReceived (SignalService) parameter.getSignalReceived()public void setSignalReceivedData(java.lang.Object signalReceivedData)
signalReceivedData - The signalReceivedData (Object) parameter.getSignalReceivedData()public void setTransport(TransportService transport)
transport - The transport (TransportService) parameter.createTransport(),
getTransport()
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCaseException.
java.lang.Exception
public void signalOccurred(SignalService source,
java.lang.Object timestamp,
java.lang.Object data)
signalOccurred in interface SignalListenersource - The source (SignalService) parameter.timestamp - The timestamp (Object) parameter.data - The data (Object) parameter.errorOccurred(Object,Object,Object)
public void startDevice()
throws java.lang.Exception
Exception.
java.lang.ExceptioncreateDevice(),
getDevice(),
setDevice(DeviceService)
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCaseException.
java.lang.Exceptionpublic void test_Fields()
public void test_InterestMask()
public void test_Interfaces()
public void test_MessageKey()
getMessageKey(MessageService)
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||