drolpi/Common

Refactor JUnit tests

Closed this issue · 0 comments

When I looked at the JUnit tests I noticed some things that are not correct and should be changed.

  • Let's start in the CheckTest there are some unnecessary variables declared. See for example line 28.
  • Continue with the TaskChainTest, there are still some tests missing. These should be added absolutely.
  • The same gives for the TaskExecutorTest.
  • In the RunnableTest a ThrowableRunnableTest should be added.
  • In the FunctionTest some methods, like e.g. line 42. #throwableFunctionTest should be outsourced in several methods. In addition, you should possibly consider whether you create a separate test class for each function.
  • In the CounterTest should be likewise paged out some methods into further methods. Maybe some tests are still missing.
  • Exactly the same is valid also for the ConsumerTest.

On the whole, more tests and test cases should be added. And the existing tests should be extended, improved and refactored. Further ideas and suggestions for improvement are welcome.