You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.
Various services follow the pattern below which makes them hard to unit test. public MessageService(SymphonyClient symClient) { this.symClient = symClient; //Lets startup the worker thread to listen for raw datafeed messages dataFeedWorker = new DataFeedWorker(symClient, this); new Thread(dataFeedWorker, "DataFeedWorker: "+ symClient.getName()).start(); }
To simplify and reduce the components that need to be initialised in unit testing, i suggest we extract the initialisation of the runnables out of the constructors into a private init method and perform the initialisation based on a new lazyInit attribute added to the ClientConfig and built using the ClientConfigBuilder
The text was updated successfully, but these errors were encountered:
Various services follow the pattern below which makes them hard to unit test.
public MessageService(SymphonyClient symClient) {
this.symClient = symClient;
//Lets startup the worker thread to listen for raw datafeed messages
dataFeedWorker = new DataFeedWorker(symClient, this);
new Thread(dataFeedWorker, "DataFeedWorker: "+ symClient.getName()).start();
}
To simplify and reduce the components that need to be initialised in unit testing, i suggest we extract the initialisation of the runnables out of the constructors into a private init method and perform the initialisation based on a new lazyInit attribute added to the ClientConfig and built using the ClientConfigBuilder
The text was updated successfully, but these errors were encountered: