Open JeremyWildsmith opened 5 years ago
I've introduced a general black box unit test on the ExampleEconomy - which I know isn't ideal but its better than nothing while we refactor the code.
I would say we need to move "examples" package from main to test. IMHO examples are best unit tests ever :)
I've integrated Travis CI to monitor the master branch build status and build statuses for PRs.
I think with the current unit tests, they should always pass until we decide to make behaviour inducing changes (which we should avoid if possible when in the refactoring stage.)
Due to the use of non-deterministic collections (ie, Set, HashMap) Currently the simulation is not deterministic enough to do a broad black box test and we will need to find a new approach or attempt to make the entire system more deterministic.
Going forward, I think it would be a good idea to implement unit testing.
We can do this by seeding the random number generator and comparing market reports to the expected values? Or maybe we can drill in deeper, but I think that is the simplest unit test to start with.
It will allow us to identify potential issues encountered due to refactoring.