You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does make sense since the class does not implements the following methods by an interface that the class isn't marked as final.
id
title
context
priority
I understand that's just a data structure but in terms of unit tests correctness I want to mock the instance of that class but obviously it's not possible.
Additional reasons are:
The constructor make calls to Wp functions which is something I would not do in an unit test
I cannot make expectations for the instance and I have to construct more instances within the same test if I want to make smaller different tests.
A class should not be marked as final if there are methods which are not part of an interface. That's just an opinionable idea but like any other reason to mark a class final .
The text was updated successfully, but these errors were encountered:
Does make sense since the class does not implements the following methods by an interface that the class isn't marked as
final
.I understand that's just a data structure but in terms of unit tests correctness I want to mock the instance of that class but obviously it's not possible.
Additional reasons are:
final
.The text was updated successfully, but these errors were encountered: