Never Update API Tests
| ←Older revision | Revision as of 04:15, 20 October 2021 | ||
| Line 3: | Line 3: | ||
=== Never Update [[API]] Tests === | === Never Update [[API]] Tests === | ||
| - | An [[API]] without tests is like cake without ketchup. Thus let's assume there are some tests checking behavior of the [[API]]. The first sign of an [[incompatible]] change is the ''need to update tests''. | + | An [[API]] without tests is like cake without a ketchup. Thus let's assume there are some tests checking behavior of the [[API]]. The first sign of an [[incompatible]] change is the ''need to update tests''. |
If you are changing an [[API]] and you have to update tests because they no longer compile, then you have broken [[Source_Compatibility]]. Common mistakes include adding new methods into interfaces or '''abstract''' methods into subclassable classes. Consider following [[API Design Patterns]]: | If you are changing an [[API]] and you have to update tests because they no longer compile, then you have broken [[Source_Compatibility]]. Common mistakes include adding new methods into interfaces or '''abstract''' methods into subclassable classes. Consider following [[API Design Patterns]]: | ||