Timeline for What is black box unit testing?
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 20, 2017 at 19:44 | comment | added | bdsl | @RobertHarvey it's true that most interfaces don't explicitly describe semantics or behaviour, but I think it's generally there implicitly. If it wasn't there then code that requires certain semantics wouldn't be able to depend on the abstraction. And there's nothing to stop interfaces including details of semantics and behaviour as comments / docblocs . For example see github.com/php-fig/http-message/blob/master/src/… | |
| Dec 20, 2017 at 14:46 | history | edited | AdamJS | CC BY-SA 3.0 | Appended my answer to handle the white-box unit-test notion, to put the answer in full perspective of what the question asked. |
| Dec 20, 2017 at 14:16 | comment | added | AdamJS | You're right; I took it as a given that your interface would include the spec from which it was written, not literally just the text of MyClassInterface. | |
| Dec 20, 2017 at 14:14 | comment | added | Robert Harvey | If you were to write the interface for a class, and then write the tests, and then you get hit by a bus, the guy who writes the class while you're in hospital should be able to do so from your interface, right? -- Not exactly. Most API contracts only really specify method signatures, not semantics or behavior. | |
| Dec 20, 2017 at 14:13 | history | edited | AdamJS | CC BY-SA 3.0 | clarified the 'mistake' of mocking a dependency |
| Dec 20, 2017 at 14:12 | history | edited | Robert Harvey | CC BY-SA 3.0 | added 3 characters in body |
| Dec 20, 2017 at 14:12 | review | First posts | |||
| Dec 20, 2017 at 16:18 | |||||
| Dec 20, 2017 at 14:11 | history | answered | AdamJS | CC BY-SA 3.0 |