public class ExpertAdvisorProtocolTest extends Object
ExpertAdvisorProtocol works as expected.| Constructor and Description |
|---|
ExpertAdvisorProtocolTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
communicationExceptionThrownInSendMethodsShouldBeRethrownInTheEventLoop()
Fatal
CommunicationException that where wrapped in a RuntimeException by the remote
Broker should be unpacked and re-thrown. |
void |
lentedVolumeIsReturnedWhenClosingTheConnection()
All volume that was lent from the
MoneyManagement is returned when the connection closes expectedly or
unexpectedly. |
void |
setUpMocksAndCut()
Wires up the mocks and set up the class to test.
|
void |
shouldNotifyClientOfFinishedMessageHandling()
After an incoming
Message was handled by the LocalExpertAdvisor the cut should send an
EventHandlingFinishedMessage message to indicate to the remote Broker that no more
Messages are send in response to the received one. |
void |
shouldReadNextMessageAfterAReadMessageWasEvaluated()
When a message was read and the appropriate actions executed, the next message should be read.
|
void |
shouldRequestCorrectExpertAdvisorBasedOnTheAlgorithmNumber()
When the protocol is started, the
LocalExpertAdvisor wrapping the correct ExpertAdvisor should be
created through the ProtocolFactory. |
void |
whenExpertAdvisorIsUnknownTheProtocolShouldFailWithAProtocolException()
When an
ExpertAdvisor number was passed to the protocol which is unknown, the protocol should fail with a
ProtocolException. |
public void setUpMocksAndCut()
throws de.voidnode.trading4j.server.protocol.CommunicationException
de.voidnode.trading4j.server.protocol.CommunicationException - not expected to leave the setup methodpublic void shouldRequestCorrectExpertAdvisorBasedOnTheAlgorithmNumber()
throws de.voidnode.trading4j.server.protocol.CommunicationException
LocalExpertAdvisor wrapping the correct ExpertAdvisor should be
created through the ProtocolFactory.
The TradingEnvironmentInformation that where read should be passed to the factory.
de.voidnode.trading4j.server.protocol.CommunicationException - not expected to leave the test.public void whenExpertAdvisorIsUnknownTheProtocolShouldFailWithAProtocolException()
throws de.voidnode.trading4j.server.protocol.CommunicationException
ExpertAdvisor number was passed to the protocol which is unknown, the protocol should fail with a
ProtocolException.de.voidnode.trading4j.server.protocol.CommunicationException - not expected to leave the test.public void shouldNotifyClientOfFinishedMessageHandling()
throws de.voidnode.trading4j.server.protocol.CommunicationException
Message was handled by the LocalExpertAdvisor the cut should send an
EventHandlingFinishedMessage message to indicate to the remote Broker that no more
Messages are send in response to the received one.de.voidnode.trading4j.server.protocol.CommunicationException - not expected to leave the test.public void shouldReadNextMessageAfterAReadMessageWasEvaluated()
throws de.voidnode.trading4j.server.protocol.CommunicationException
de.voidnode.trading4j.server.protocol.CommunicationException - not expected to leave the test.public void communicationExceptionThrownInSendMethodsShouldBeRethrownInTheEventLoop()
throws de.voidnode.trading4j.server.protocol.CommunicationException
CommunicationException that where wrapped in a RuntimeException by the remote
Broker should be unpacked and re-thrown.de.voidnode.trading4j.server.protocol.CommunicationException - not expected to leave the test.public void lentedVolumeIsReturnedWhenClosingTheConnection()
throws Exception
MoneyManagement is returned when the connection closes expectedly or
unexpectedly.Exception - not expected to leave the test.Copyright © 2016. All rights reserved.