Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring #247

Closed
tiabc opened this issue Aug 13, 2017 · 0 comments
Closed

Refactoring #247

tiabc opened this issue Aug 13, 2017 · 0 comments

Comments

@tiabc
Copy link
Contributor

tiabc commented Aug 13, 2017

  1. Rename methods of the common.JailCell interface:
    CellVM() -> VM()
    CellLoop() -> Loop()
  2. Get rid of duplicated code in common.Jail struct methods: Call, JailCell, JailCellVM, GetCell.
  3. Get rid of the Jail prefix everywhere in the jail package.
  4. Rewrite tests to use jail.NewJailCell instead of jailInstance.Parse(testChatID, ``).
  5. In JailTestSuite initialise the internal jail with BaseJS in SetupSuite and initialise a test jail cell in SetupTest. The idea is to make those tests as meaningful as possible avoiding as much extra scaffolding as we can.
  6. Refactor all tests to use testify asserts. Tests become twice as short and twice as meaningful.
  7. Figure out if one of Jail.GetJailCell and Jail.GetCell could be removed. This looks like rather an architecture issue.
  8. See if it's possible to invoke jail.BaseJS in setup methods in JailTestSuite instead of doing it in every test.

As this is a refactoring issue, it must be finished and merged within a day. Please, plan accordingly.
If you have new refactoring notes during implementing these, write them into #200.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant