Skip to content

Added files via upload #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions appengine/requests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,7 @@ Copyright 2016 Google Inc. All Rights Reserved.
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.3</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>

<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.when;

import com.google.appengine.tools.development.testing.LocalServiceTestHelper;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -42,9 +40,6 @@
*/
@RunWith(JUnit4.class)
public class LoggingServletTest {
// Set up a helper so that the ApiProxy returns a valid environment for local testing.
private final LocalServiceTestHelper helper = new LocalServiceTestHelper();

// To capture and restore stderr
private final ByteArrayOutputStream stderr = new ByteArrayOutputStream();
private static final PrintStream REAL_ERR = System.err;
Expand All @@ -60,7 +55,6 @@ public void setUp() throws Exception {
System.setErr(new PrintStream(stderr));

MockitoAnnotations.initMocks(this);
helper.setUp();

// Set up a fake HTTP response.
responseWriter = new StringWriter();
Expand All @@ -73,8 +67,6 @@ public void setUp() throws Exception {
public void tearDown() {
// Restore stderr
System.setErr(LoggingServletTest.REAL_ERR);

helper.tearDown();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.when;

import com.google.appengine.tools.development.testing.LocalServiceTestHelper;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -40,9 +37,6 @@
*/
@RunWith(JUnit4.class)
public class RequestsServletTest {
// Set up a helper so that the ApiProxy returns a valid environment for local testing.
private final LocalServiceTestHelper helper = new LocalServiceTestHelper();

@Mock private HttpServletRequest mockRequest;
@Mock private HttpServletResponse mockResponse;
private StringWriter responseWriter;
Expand All @@ -51,19 +45,14 @@ public class RequestsServletTest {
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
helper.setUp();

// Set up a fake HTTP response.
responseWriter = new StringWriter();
when(mockResponse.getWriter()).thenReturn(new PrintWriter(responseWriter));

servletUnderTest = new RequestsServlet();
}

@After public void tearDown() {
helper.tearDown();
}


@Test
public void doGet_writesResponse() throws Exception {
servletUnderTest.doGet(mockRequest, mockResponse);
Expand Down