Unseal the TradeResult Class so that we can unit test please

Created at 13 Dec 2023, 19:50
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TH

thomas.myinvestments

Joined 13.12.2023

Unseal the TradeResult Class so that we can unit test please
13 Dec 2023, 19:50


Hi there

Our team is unit testing our bots now, and we are running into a problem that we can't mock out any method that is part of TradeResult class because it is sealed, but we haven't found any other class that is sealed so we don't understand the need for it.

It makes it difficult because we can't mock out any properties of the class or any methods, like PlaceStopOrder, but we kind of need that.


cTrader Automate
@thomas.myinvestments