And on the downside, this will contribute to the
obscuration of Law of Demeter violations, leading to
potentially lots of transient coupling and "stolen"
dependencies (dependency hub in the extreme is an
anti-pattern).
I've wanted this kind of thing before in the past, but
I've found that the absence of direct support for
train-wreck syntax and broken encapsulation in mocking
frameworks was a good thing. This kind of thing is often
a tell that there's a better design waiting to be
realized.
Nonetheless, nice feature when cheating is fine and
reasonable.
"Nonetheless, nice feature when cheating is fine and
reasonable."
Which is often and should in fact be encouraged whenever
possible.