Timeline for Are parsers a special case in unit testing?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 2, 2018 at 15:07 | comment | added | R. Schmitz |
"First of all, if you get the file from disk, it's an integration test, not a unit test." Well, classes called Encoder and Parser probably shouldn't do any IO. I just wanted to express that the application has code to both encode and decode the information. I currently have a lot of parsers that only decode data from a server, while the application has no idea how to encode it.
|
|
May 2, 2018 at 14:37 | comment | added | Flater | @SteveChamaillard: Depends on the refactoring. Refactoring in the sense that you've split the workload over two separate layers; yes it becomes an integration test. Refactoring in the sense that you create additional internal classes, then it remains a unit test as you're still testing the smallest possible chunk. In short, unit testing is seeing if Bob can throw a ball and catch a ball; and seeing if Tom can throw a ball, and catch a ball. Integration testing is seeing if Tom and Bob can play catch. | |
May 2, 2018 at 14:34 | comment | added | Steve Chamaillard | "Integration tests test whether multiple components are working together." - when refactoring the class into multiple classes, doesn't this make a unit test an integration test then ? | |
May 2, 2018 at 14:22 | history | edited | Flater | CC BY-SA 4.0 |
added 301 characters in body
|
May 2, 2018 at 14:16 | history | edited | Flater | CC BY-SA 4.0 |
added 301 characters in body
|
May 2, 2018 at 14:04 | history | answered | Flater | CC BY-SA 4.0 |