Feedback on a base "fake" type in the testing repo
Eric Snow
eric.snow at canonical.com
Thu Feb 12 02:08:28 UTC 2015
On Wed, Feb 11, 2015 at 6:43 PM, Andrew Wilkins
<andrew.wilkins at canonical.com> wrote:
> Looks okay in principal, though I'm not sure how much benefit it would
> add to the existing, tailored fakes in the codebase. It seems a little bit
> weird that error results are encapsulated, but not non-error results.
Yeah, I've tried to make that work several different ways to no avail.
It's messy since return types vary greatly and a mechanism to
accommodate them would require extra boilerplate in faked methods to
accommodate type conversions. So it didn't seem worth bothering to
me.* Error returns are a different story since there is only one type
to deal with (error).
-eric
* I suppose I could use reflection to make it all work out, but I'd
rather avoid the complexity (at least in this initial patch).
More information about the Juju-dev
mailing list