DEV Community

Discussion on: Unit testing is simple

Collapse
 
daveoncode profile image
Davide Zanotti

unit testing is far more complex than writing an assertion statement... this post is pointless :/

Collapse
 
scalawilliam profile image
William Narmontas

What do you have in mind? I'd like to know to improve the post :)

I do use test frameworks extensively and find people have severe resistance to testing because of the learning curve. So this is a simple alternative for the newbie.

Collapse
 
daveoncode profile image
Davide Zanotti

What you define as "unit test" in your post are actually mere assertions. They are helpful to ensure the sound state of your internal code but not for documenting and ensuring that your code behaves correctly as expected (as in a unit test). So, I'm not saying that assertions in code are useless, I'm saying that it's not unit testing! moreover an unit test has usually multiple assertions because the goal is to thest a method (the unit) under different scenarios!