public class IndicatorProtocolTest extends Object
IndicatorProtocol works as expected.| Constructor and Description |
|---|
IndicatorProtocolTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
setUpMocks()
Wires up the mocks.
|
void |
setUpProtocol()
Sets up the protocol to test.
|
void |
shouldRecivedCandleSendItToIndicatorAndSendTheTrendBackToTheClient()
After indicator indicator initialization has finished, the protocol should receive a candle, send it to the
indicator and send the results of the indicator back to the client.
|
void |
shouldReciveNextCandleAfterTrendWasSend()
After the trend for a candle was send back to the client, the protocol should be waiting to receive the next
candle.
|
void |
shouldRequestCorrectIndicatorBasedOnTheIndicatorNumber()
The protocol should use the indicator factory to create the correct indicator for the given indicator number.
|
void |
whenIndicatorIsUnknownTheProtocolShouldFailWithAProtocolException()
If no indicator is known for the received number, the protocol should close the connection and throw a
ProtocolException.
|
public void setUpMocks()
public void setUpProtocol()
public void shouldRequestCorrectIndicatorBasedOnTheIndicatorNumber()
throws de.voidnode.trading4j.server.protocol.CommunicationException
CommunicationException - not expected to leave the test methodpublic void whenIndicatorIsUnknownTheProtocolShouldFailWithAProtocolException()
throws Exception
Exception - not expected to leave the test methodpublic void shouldRecivedCandleSendItToIndicatorAndSendTheTrendBackToTheClient()
throws Exception
Exception - not expected to leave the test methodCopyright © 2016. All rights reserved.