Answer the question
In order to leave comments, you need to log in
Is it considered good practice to create test objects if there is no way to create mocks?
Is it considered good practice to create test objects if there is no way to create mocks?
I have a method that takes an argument of type ConnectionInterface and this object must have a certain property.
I need to test a method that works with this interface. Due to the fact that there is no way to create a mock and define a property for it, I simply created a test object of the ConnectionInterface type.
The tests work, but is this the right approach?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question