On Wed Feb 04 2015 at 9:42:49 AM Michal Bendowski <bendow...@google.com>
wrote:

> I agree with Roman here - it's not clear to me how subclassing would solve
> the real issue: you would still have to implement all methods that you call
> from production code.
>

With a fake I can implement it in a re-usable fashion using actual behavior
(e.g., a Bundle backed by a Map). With mocks I have to script behavior,
thus negating any utility of the unit test's logic (or, at least making it
redundant).


> What we might also consider is having an android-util library that gives
> you the real, working implementation of Uri. But that's a different
> conversation.
>

Everyone wants this badly, but...

This is a bottomless pit which I would advise against. That exact sentence
was uttered 4 years ago and now we have the half-abomination (fake impls),
half-amazeballs (real impls, like Uri) that is Robolectric.

Where does this stop? Intent? Bundle? Parcel? With Parcel now you're
hitting native code. Do you fake those methods? Compile the .so's for the
desktop?

Spend your energy on a simulator which runs on the JVM instead. That's the
logical conclusion to your statement, after all!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adt-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to