D
D
ddd3292021-04-22 20:24:38
Unit testing
ddd329, 2021-04-22 20:24:38

Is this the right approach to unit testing?

Guys, I greet you!
When I test class methods with a single constructor, I accordingly do this: I create an instance of an object of this class using a single constructor, and then I test the method / methods.
So I think, what if there are several constructors ... How should I test the methods then? First I create objects with one constructor and test the methods, and then I create with another constructor and test the same methods?

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