Code2Gether-Discord / Code2Gether-Discord-Bot

A Discord bot for the Code2Gether server
3 stars 1 forks source link

Refactoring Unit Tests #35

Open srjheam opened 3 years ago

srjheam commented 3 years ago

As previously discussed in #30 and #29 refactoring this project's tests might be a good idea

Closes #30

srjheam commented 3 years ago

Hi @nickmartin1ee7, what do you think about the progress so far?

srjheam commented 3 years ago

I'm planning to:

What's your opinion about it, @nickmartin1ee7?

srjheam commented 3 years ago
  • [ ] Separe test files between folders imitating the project's structure. (maybe?)

IMHO Much better

srjheam commented 3 years ago
  • [x] Make TestConfig the only bridge between Tests and Fakes, e.g. [Test]TestSomething calls TestConfig which calls Fake which aswers TestConfig which deploys the object to the [Test] ([Test] ↦ TestConfig ↦ Fakes).

Progress have been make. Did I do it right? @nickmartin1ee7 @DonSagiv It still looks a little messy.

srjheam commented 3 years ago

I just want to point out how easy it was to apply these fixes, I just had to change a few lines in TestConfig.

I got that idea from: Writing Clean Tests – It Starts From the Configuration.

nickmartin1ee7 commented 3 years ago

@srjheam We are going to wait on this PR. The #32 is going to merge soon and this will drastically affect the tests.

nickmartin1ee7 commented 3 years ago

@srjheam Would you want to update this branch, and look at this again issue again?