Skip to content

Commit 57a7454

Browse files
authored
Minor updates to UtUtilsClass docs (#1374)
1 parent 2c9d1a3 commit 57a7454

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/UtUtilsClass.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
## What are the utility methods
44

55
_Utility methods_ implement common, often re-used operations which are helpful for accomplishing tasks in many
6-
classes. In UnitTestBot _utility methods_ include those related to creating instances, checking deep
7-
equals, working with arrays, using lambdas and so on — miscellaneous methods necessary for generated tests.
6+
classes. In UnitTestBot, _utility methods_ include those related to creating instances, checking deep
7+
equality, mocking, using lambdas and so on — miscellaneous methods necessary for generated tests.
88

99
## Why to create UtUtils class
1010

11-
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.
11+
Previously, UnitTestBot generated _utility methods_ for each test class when they were needed — and only those which
12+
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.
1213

1314
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.
1415

15-
We create a separate `UtUtils` class for each supported codegen language (if this class is required).
16+
We create a separate `UtUtils` class for each supported language (if required).
1617

1718
## What does it look like
1819

19-
Here is an example of documentation comment inherent to every `UtUtils` class:
20+
Here is an example of a documentation comment inherent to every `UtUtils` class:
2021

2122
![Documentation](images/utbot_ututils_2.0.png)
2223

@@ -35,8 +36,9 @@ UnitTestBot uses [Mockito framework](https://site.mockito.org/) to implement moc
3536
`deepEquals()`
3637
_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.
3738

38-
If you have previously generated tests with mocking, the next `UtUtils` class will support mocking as well — even if
39-
it is upgraded or current tests do not need mocking, so that the existing tests can still
39+
If you have previously generated tests with mocking, the next generated `UtUtils` class supports mocking as well —
40+
even if
41+
its version is upgraded or current tests do not need mocking, so that the existing tests can still
4042
rely on the proper methods from `UtUtils` class.
4143

4244
## Where to find it

0 commit comments

Comments
 (0)