So. Much. Mock. Code. I am so glad we moved away from Unit Testing to other forms of test automation.
@gruttewibe76 Жыл бұрын
What are those other forms of test automation? I think unit testing can work well if we are testing with the right definition of 'unit' (a unit of behaviour), and if the architecture is testable. 'Unit of behaviour' may be a couple of classes together. We don't have to mock stuff when it's our own code, and when that own code doesn't talk to the external world/environment.
@danielwilkowski58996 ай бұрын
Please don't think that "unit tests" is about mocking. The guy in the video does that, and you're right it sucks, but you can very well do unit tests without mocks. This guy just doesn't know how apparently.
@JakubPilimon6 ай бұрын
@@danielwilkowski5899 Well, if you had watched this, you would know that the guy in the video shows what happens when you mock, what happens when you don't mock, and what happens when you know when to mock and when not to mock. Some people call it drawing your own conclusions, but this happens when a person pays attention to what they are watching.
@danielwilkowski58996 ай бұрын
@@JakubPilimonDon't get me wrong, I appreciate the authors willingness to show his tries and his attempts, that's natural part of anyones journey, everyone is learning at some point. But showing his attempts and giving them a title "unit testing done right" is just misleading for people who look for quality practices.