A
A
Alexey Verkhovtsev2019-03-03 15:00:05
Unit testing
Alexey Verkhovtsev, 2019-03-03 15:00:05

How to use TDD for unit testing?

Read the book by Kent Beck Test Driven Development. Got Brain TDD and I really like it, but here's the thing, he doesn't test every single class and its methods in the book. For a module, he takes some functionality and no matter how many classes there are in it and tests it, I think this is integration testing. But in unit testing, it is customary to write a test class for the class that we are testing. How can I integrate TDD into this approach, when I don’t know in advance what class I will create, what I will do. Now I just created a general test class and test all business cases in it, but it doesn't look like unit testing. How do you solve it? I hope I explained clearly

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question