There are no build errors or missing dependancies. I use the regular
buildpath containing only the App Engine SDK Library, JUnit3 Library,
JRE System Library plus the external jars:

... eclipse\plugins\com.google.appengine.eclipse.sdkbundle.
1.3.0_1.3.0.v200912141120\appengine-java-sdk-1.3.0\lib\impl\appengine-
api-stubs.jar
... eclipse\plugins\com.google.appengine.eclipse.sdkbundle.
1.3.0_1.3.0.v200912141120\appengine-java-sdk-1.3.0\lib\impl\appengine-
local-runtime.jar

needed for the local APIProxi and Testenvironment. Maybe there is a
mistake here:

public class LocalServiceTestCase extends TestCase {

        @Override
        public void setUp() throws Exception {
                super.setUp();
                ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());
                ApiProxyLocalImpl apiProxyLocalImpl = new ApiProxyLocalImpl(new 
File
(".")) {};
                ApiProxy.setDelegate(apiProxyLocalImpl);
                apiProxyLocalImpl.setProperty
(LocalDatastoreService.NO_STORAGE_PROPERTY, Boolean.TRUE.toString());
        }

        @Override
        public void tearDown() throws Exception {
                ApiProxyLocalImpl proxy = (ApiProxyLocalImpl) 
ApiProxy.getDelegate
();
        LocalDatastoreService datastoreService =
            (LocalDatastoreService) proxy.getService
(LocalDatastoreService.PACKAGE);
        datastoreService.clearProfiles();
                ApiProxy.setDelegate(null);
                ApiProxy.setEnvironmentForCurrentThread(null);
                super.tearDown();
        }
}

public class TestEnvironment implements ApiProxy.Environment {

        private static final String DEFAULT_EMAIL = "t...@example.com";
        private String email = DEFAULT_EMAIL;

        public String getAppId() {
                return "mysery-pua";
        }

        public String getVersionId() {
                return "2";
        }

        public String getEmail() {
                return email;
        }

        public boolean isLoggedIn() {
                return true;
        }

        public boolean isAdmin() {
                return false;
        }

        public String getAuthDomain() {
                return "huh";
        }

        public String getRequestNamespace() {
                return "ns_null";
        }

        public Map<String, Object> getAttributes() {
                Map<String, Object> map = new HashMap<String, Object>();
                
map.put("com.google.appengine.api.users.UserService.user_id_key",
email);
                map.put("com.google.appengine.server_url_key", 
"http://localhost:
8080");
                return map;
        }

        public void changeUser(String email) {
                this.email = email;
        }

        public void defaultUser() {
                email = DEFAULT_EMAIL;
        }
}

On 3 Feb., 07:01, John Patterson <jdpatter...@gmail.com> wrote:
> On 3 Feb 2010, at 04:22, Markus Scheidgen wrote:
>
> > But you change it a little bit,
> > maybe comment some unimportant line, and it stops working.
>
> hmmm that sounds suspiciously like a build problem.  Are you sure the  
> project is always building?  i.e. no "missing dependancy" errors in  
> the Eclipse (or whatever) problems panel.  Or could your debugging  
> session be inconsistent?

-- 
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-j...@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.

Reply via email to