Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context)
Tries to close https://github.com/neo-project/neo/issues/3231
Get some examples for mock from https://github.com/neo-project/neo-modules/pull/836
I see it is on Dev branch, maybe it is better to merge as it is and we create other PRs. This PR is already too old
In fact, SimulateCompleteConsensusRoundAsync was not a test method,
@Jim8y
I tried to modify some tests to produce errors
Like this, the
WaitForConsensusMessagesshould fail because I did not send PrepareRequest.I think that we still need some minor modifications before merging to "dev". Maybe we could also remove some duplicated tests and code. I am missing coveralls to analyse that more carefully (ping @shargon )
But, overall, the design looks great.
I need to access
ConsensusContextof the Actors in order to verify some states after messages are sent and service starts. I am still not sure how to do that.
Sure vitor, give me one day to refactoring this pr to match your review expection.
Only 25% is covered, but it's a good start
Test time too long
Neo.Plugins.DBFTPlugin.Tests test succeeded (34.0s)
