Use a compositional model instead of inheritance for Robot
Use a compositional model instead of inheritance for Robot
18 May 2016, 07:24
At the moment we have to inherit from the robot class to allow us to write robots, this is a problem as it makes it much harder to unit test our robots. Could we not have an interface instead ? and expose the robot class more as a service ? So that we can inject it into our robots instead ? that would enable us to mock the cAlgo api, use ioc etc, you could even start splitting up the api, so we would only depend on what we needed ?
Replies
... Deleted by UFO ...
... Deleted by UFO ...
jaredthirsk
24 Jun 2016, 11:28
If you truly want this to be a professional platform with high quality user code to bolster the ecosystem, ease of unit testing seems like a good thing.
@jaredthirsk
WhiteSage
25 May 2016, 07:29
I wish I had votes left! This is exactly what you might expect from a platform that does not need to rely on interpreted scripting.
@WhiteSage