I have the following server side code: package com.foo.server; // code deleted for brevity /** * The server side implementation of the RPC service. */ @SuppressWarnings("serial") public class FooServiceImpl extends RemoteServiceServlet implements FooService { // code deleted for brevity @Override public String barTest() { return "unitTest"; } } // FooServiceImpl
I copied/implemented the TestEnvironment and LocalServiceTestCase classes as shown on http://code.google.com/appengine/docs/java/howto/unittesting.html. Then, I implemented the following: public class ServerTest extends LocalServiceTestCase { ApiProxyLocalImpl proxy = (ApiProxyLocalImpl) ApiProxy.getDelegate(); FooServiceImpl server = (FooServiceImpl ) proxy.getService ("com.foo.server"); String result = barTest(); // produces java.lang.NullPointerException assertEquals("unitTest", result); } // ServerTest I got the java.lang.NullPointerException on this line "String result = barTest();" My environments: GAE 1.25, GWT 1.7, Eclipse-Galileo on Windows Vista. I am new on this. What did I do wrong? Thanks in advance for your help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---