Closed rnbguy closed 2 months ago
While we're at it, it would be good to improve the namings, establish a clear convention, and describe this convention somewhere, for example, in the lib.rs
of the ibc-testkit
. We've discussed this before, but it's evident that we use Test***
in some places and Mock***
in others. I was thinking of something like this (Take it as a suggestion):
The traits and structs that allow users to introduce their artifacts/implementation can follow the Test***
pattern, as it is with the TestHost
and TestBlock
, and the object that implements these traits or derived from this struct can follow Mock***
. Therefore e.g. :
MockGenericContext<S, H>
can be renamed to TestContext<S, H>
Perhaps would be more efficient to specify the generic H
for the MockContext<H>
too, as below:
pub type MockContext = TestContext<MockStore, MockHost>;
pub type TendermintContext = TestContext<MockStore, TendermintHost>;
@seanchen1991 would be great to have your opinion in this regard.
@Farhad-Shabani I agree with your assessment that we should document the conventions and semantics of ibc-testkit post-refactor in the crate's root 👍
I also like your suggesting about aliasing the different TestContext
s.
Agree with @Farhad-Shabani ! Let me make these changes on #1109 directly.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 66.38%. Comparing base (
6e7172d
) to head (cb8e706
). Report is 4 commits behind head on feat/refactor-testkit.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Part of #1109
Rendered
Description
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.