unit_tests
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
unit_tests [2016/09/08 17:42] – [Implementing Unit Tests] mhatz | unit_tests [2016/09/08 17:44] – [Example] mhatz | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== HOWTO writing a unit test for a class ===== | ===== HOWTO writing a unit test for a class ===== | ||
- | Each class of Mail2Voice must have its dedicated unit tests to check every method | + | Each class of Mail2Voice must have its dedicated unit tests to check every methods |
==== Example ==== | ==== Example ==== | ||
Line 34: | Line 34: | ||
</ | </ | ||
- | MyClass is a very simple class that does two things : incrementing an internal variable and setting an internal text. Nothing special | + | MyClass is a very simple class that does two things : incrementing an internal variable and setting an internal text. Nothing special |
- | Wait, mistakes are common and even if you are sure of your code, are you sure that no one else won't introduce errors in your code? That, is where unit tests are useful : ensuring your code is correct and will stay correct over time. Saving you a lot of time of debugging in the future. | + | Wait, mistakes are common and even if you are sure of your code, are you sure that no one else won't introduce errors in your code? That, is where unit tests are useful: ensuring your code is correct and will stay correct over time. Saving you a lot of time of debugging in the future. |
==== What to test? ==== | ==== What to test? ==== |
unit_tests.txt · Last modified: 2023/04/25 16:52 by 127.0.0.1