bool get animationCompleted =>
_popupAnimationSubject.value == PopupAnimationStatus.completed;
I have this method in my PopupController
class where _popupAnimationSubject
is a BehaviorSubject
so I can't expose as a public member and I can't put it in the constructor as a parameter since the user is not supposed to provide its value but it is rather created internally.
I am struggling to test this method. There is this answer that suggests to make it public and annotate it for testing only but as I said this is an api and I don't want non-careful users to break the state of the controller unintentionally.
What is the best way to test this method?
note: I also looked at this and this but they didn't answer me as this is not a "getter" despite the name because it contains some logic (the equality check)