Thanks for starting this thread. I have my Junit tests working,
including my datastore tests, but I have a question regarding project
setup. I suppose this is more of an Eclipse question than anything
else, but perhaps you can help. I've worked in NetBeans prior, and I
can setup a 'test' folder
Yes, I missed that method.
Maybe add this little trick on tutorial for now!?
Krishna
2010/2/11 Max Ross (Google) :
> Great, glad to hear it! I forgot to add a method to LocalServiceTestHelper
> to set a custom app id. My mistake. I'll make sure this gets added for the
> next release so you don
Great, glad to hear it! I forgot to add a method to LocalServiceTestHelper
to set a custom app id. My mistake. I'll make sure this gets added for the
next release so you don't need to provide your own Environment
implementation.
Max
On Thu, Feb 11, 2010 at 10:30 AM, Krishna Caldas wrote:
> Yo
You're right!
I refactored my code and forget to annotate the new setUp method with @Before.
Sorry for taking your time! It works now.
Thanks,
Krishna
2010/2/11 Max Ross (Google) :
> Your code looks fine. Are you sure you're calling setUp() on the
> LocalServiceTestHelper?
>
> On Thu, Feb 11, 2
Your code looks fine. Are you sure you're calling setUp() on the
LocalServiceTestHelper?
On Thu, Feb 11, 2010 at 10:11 AM, Krishna Caldas wrote:
> Ooops.. missed your question!
> It's just:
>@Override
>protected Environment newEnvironment() {
>return new TestEnvir
Ooops.. missed your question!
It's just:
@Override
protected Environment newEnvironment() {
return new TestEnvironment();
}
Thanks,
Krishna
2010/2/11 Max Ross (Google) :
> Subclassing LocalServiceTestHelper and overriding newEnvironment() should
> work fine
It's the same (attached) I used before update to 1.3.1.
Thanks,
Krishna
2010/2/11 Max Ross (Google) :
> Subclassing LocalServiceTestHelper and overriding newEnvironment() should
> work fine. What does your implementation of newEnvironment() look like?
>
> On Wed, Feb 10, 2010 at 7:35 PM, Krishna
Subclassing LocalServiceTestHelper and overriding newEnvironment() should
work fine. What does your implementation of newEnvironment() look like?
On Wed, Feb 10, 2010 at 7:35 PM, Krishna wrote:
> Ok!
>
> But when I'm using transactions I'm getting:
>
> java.lang.NullPointerException: No API env
Ok!
But when I'm using transactions I'm getting:
java.lang.NullPointerException: No API environment is registered for
this thread.
at
com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(DatastoreApiHelper.java:
67)
at
com.google.appengine.api.datastore.DatastoreS