Do you need to mock Entity? Can you use a real instance of an Entity and
check for state changes? You can mock out DatastoreService, so it might make
more sense to write your expects() in those mocks instead. Entity classes
only really have getProperty() and setProperty(), and in my opinion, it's
not worth writing tests to see if these get called. What are you trying to
do?

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Thu, Oct 28, 2010 at 9:31 AM, Mayumi Liyanage <
[email protected]> wrote:

> In the project I'm working on we are using GWT + GAE. We are unit
> testing using automocking container Jukito (http://code.google.com/p/
> jukito/) which is  build on top of Mokito (http://code.google.com/p/
> mockito/) + JUnit.
> The problem is unit testing the Mapper API. Since Mapper API's map
> method takes an Entity as a argument so testing framework will have to
> have access to this Entity class. However we could not mock the Entity
> class since it is a final class.  Also, we could not instantiate the
> Entity class outside of GAE environment. '
> Does anyone have workaround for unit testing using Entity?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to