State interfaces

John Arbash Meinel john at arbash-meinel.com
Thu Oct 31 12:57:18 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2013-10-31 16:21, Andrew Wilkins wrote:
> Does anybody object to converting the public entity structs in 
> state to interfaces? i.e. State, Machine, Unit, etc.
> 
> I'd like to write some tests for new code that depends on state. 
> Setting up mongo and so on is overkill. and should be relegated to 
> integration testing.
> 
> Cheers, Andrew
> 
> 

I would say that if you want an interface you probably don't need the
whole set of functions that Unit/Machine/etc provide. And a smaller
interface means you don't have to create a fake one that has a bunch
of methods you don't actually use.

Something to think about, at least.

I personally like having interfaces, but I'm not sure that all of
Unit/Machine/etc need to be turned into an interface. There are
already a few that we have (like Entity, etc).

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJyU64ACgkQJdeBCYSNAAMJPQCg2D+tL2gx2+U4cYFBsnf9/uQW
ofsAnjnS8bgxEd560bI0N80ilFdFFaxK
=stRr
-----END PGP SIGNATURE-----



More information about the Juju-dev mailing list