LocalServiceTestCase.java :  » App » mobile-life » org » beyond » test » Android Open Source

Android Open Source » App » mobile life 
mobile life » org » beyond » test » LocalServiceTestCase.java
package org.beyond.test;

import java.io.File;

import org.junit.After;
import org.junit.Before;

import com.google.appengine.tools.development.ApiProxyLocalImpl;
import com.google.apphosting.api.ApiProxy;

public class LocalServiceTestCase {

  @Before
  public void setUp() throws Exception {
    ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());
    ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(".")) {
    });
  }

  @After
  public void tearDown() throws Exception {
    // not strictly necessary to null these out but there's no harm either
    ApiProxy.setDelegate(null);
    ApiProxy.setEnvironmentForCurrentThread(null);
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.