Test of Object-oriented Programs
- slide 27 : 35
Unit Test Concepts
Understanding the common concepts of Unit testing
Assertion
A boolean function which compares some value or state with its expected result
"An atomic test" -
true
means
pass
,
false
means
fail
Test
or
Test case
Execution of a piece of code followed by activation of one or more assertions
Test suite
An aggregation of test cases
Test fixture
A fixed state used as a baseline for running a set of tests [Wikipedia]
Used to ensure that each test is executed in a fixed and well-defined state, such that a test is repeatable
Test cases and Test suites may be organized as a
Composite
The Composite design pattern