Support unit test outside
wenhaocs opened this issue · 0 comments
wenhaocs commented
Clients may want to write unit tests with nebula-go client. They will mock the Execute
interface and return a mock ResultSet
. But there is no public function to generate a mock result set. The members inside result set is also private.
We should (1) either create a mock ResultSet
and mock Record
. (Users are using mockery
, //go:generate mockery --name=Client --outpkg=mocknebula --output=./mocknebula)
(2) or expose a public method to construct ResultSet
and Record
.