Posts

Showing posts with the label CheckNotNull

Unit Testing in Delphi by using DUnit

Image
Unit Test Introduction Unit testing defines that each unit test sends a specific input to a method and verifies that the method returns the expected value, or takes the expected action. Unit tests prove that the code you are testing does in fact do what you expect it to do. For more about Unit Testing please visit http://www.extremeprogramming.org/rules/unittests.html The Value of Unit Tests One of the most valuable benefits of unit tests is that they give you confidence that your code works as you expect it to work. Unit tests give you the confidence to do long-term development because with unit tests in place, you know that your foundation code is dependable. Unit tests give you the confidence to refactor your code to make it cleaner and more efficient. Unit tests also save you time because unit tests help prevent regressions from being introduced and released. Once a bug is found, you can write  a unit test for it, you can fix the bug, and the bug can never make it to p...