diff --git a/docs/UtUtilsClass.md b/docs/UtUtilsClass.md index ed1cfeab51..af99a94bbe 100644 --- a/docs/UtUtilsClass.md +++ b/docs/UtUtilsClass.md @@ -3,20 +3,21 @@ ## What are the utility methods _Utility methods_ implement common, often re-used operations which are helpful for accomplishing tasks in many -classes. In UnitTestBot _utility methods_ include those related to creating instances, checking deep -equals, working with arrays, using lambdas and so on — miscellaneous methods necessary for generated tests. +classes. In UnitTestBot, _utility methods_ include those related to creating instances, checking deep +equality, mocking, using lambdas and so on — miscellaneous methods necessary for generated tests. ## Why to create UtUtils class -Previously UnitTestBot generated _utility methods_ for each test class when they were needed — and only those which were necessary for the given class. They were declared right in the generated test class, occupying space. Generating multiple test classes often resulted in duplicating _utility methods_ and consuming even more space. +Previously, UnitTestBot generated _utility methods_ for each test class when they were needed — and only those which +were necessary for the given class. They were declared right in the generated test class, occupying space. Generating multiple test classes often resulted in duplicating _utility methods_ and consuming even more space. For now UnitTestBot provides a special `UtUtils` class containing all _utility methods_ if at least one test class needs some of them. This class is generated once and the specific methods are imported from it if necessary. No need for _utility methods_ — no `UtUtils` class is generated. -We create a separate `UtUtils` class for each supported codegen language (if this class is required). +We create a separate `UtUtils` class for each supported language (if required). ## What does it look like -Here is an example of documentation comment inherent to every `UtUtils` class: +Here is an example of a documentation comment inherent to every `UtUtils` class: ![Documentation](images/utbot_ututils_2.0.png) @@ -35,8 +36,9 @@ UnitTestBot uses [Mockito framework](https://site.mockito.org/) to implement moc `deepEquals()` _utility method_ should be configured — it should have a check: whether the compared object is a mock or not. That is why the `UtUtils` class for the tests with mocking differs from the one without mocking support. -If you have previously generated tests with mocking, the next `UtUtils` class will support mocking as well — even if -it is upgraded or current tests do not need mocking, so that the existing tests can still +If you have previously generated tests with mocking, the next generated `UtUtils` class supports mocking as well — +even if +its version is upgraded or current tests do not need mocking, so that the existing tests can still rely on the proper methods from `UtUtils` class. ## Where to find it