Skip to content

Commit 672b708

Browse files
committed
Added files via upload
1 parent c9c1cc6 commit 672b708

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

appengine/requests/pom.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,7 @@ Copyright 2016 Google Inc. All Rights Reserved.
9393
<!-- for hot reload of the web application -->
9494
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
9595
<plugins>
96-
<plugin>
97-
<groupId>org.apache.maven.plugins</groupId>
98-
<version>3.3</version>
99-
<artifactId>maven-compiler-plugin</artifactId>
100-
<configuration>
101-
<source>1.7</source>
102-
<target>1.7</target>
103-
</configuration>
104-
</plugin>
96+
10597
<plugin>
10698
<groupId>com.google.appengine</groupId>
10799
<artifactId>appengine-maven-plugin</artifactId>

appengine/requests/src/test/java/com/example/appengine/requests/LoggingServletTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import static com.google.common.truth.Truth.assertThat;
2020
import static org.mockito.Mockito.when;
2121

22-
import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
23-
2422
import org.junit.After;
2523
import org.junit.Before;
2624
import org.junit.Test;
@@ -42,9 +40,6 @@
4240
*/
4341
@RunWith(JUnit4.class)
4442
public class LoggingServletTest {
45-
// Set up a helper so that the ApiProxy returns a valid environment for local testing.
46-
private final LocalServiceTestHelper helper = new LocalServiceTestHelper();
47-
4843
// To capture and restore stderr
4944
private final ByteArrayOutputStream stderr = new ByteArrayOutputStream();
5045
private static final PrintStream REAL_ERR = System.err;
@@ -60,7 +55,6 @@ public void setUp() throws Exception {
6055
System.setErr(new PrintStream(stderr));
6156

6257
MockitoAnnotations.initMocks(this);
63-
helper.setUp();
6458

6559
// Set up a fake HTTP response.
6660
responseWriter = new StringWriter();
@@ -73,8 +67,6 @@ public void setUp() throws Exception {
7367
public void tearDown() {
7468
// Restore stderr
7569
System.setErr(LoggingServletTest.REAL_ERR);
76-
77-
helper.tearDown();
7870
}
7971

8072
@Test

appengine/requests/src/test/java/com/example/appengine/requests/RequestsServletTest.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
import static com.google.common.truth.Truth.assertThat;
2020
import static org.mockito.Mockito.when;
2121

22-
import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
23-
24-
import org.junit.After;
2522
import org.junit.Before;
2623
import org.junit.Test;
2724
import org.junit.runner.RunWith;
@@ -40,9 +37,6 @@
4037
*/
4138
@RunWith(JUnit4.class)
4239
public class RequestsServletTest {
43-
// Set up a helper so that the ApiProxy returns a valid environment for local testing.
44-
private final LocalServiceTestHelper helper = new LocalServiceTestHelper();
45-
4640
@Mock private HttpServletRequest mockRequest;
4741
@Mock private HttpServletResponse mockResponse;
4842
private StringWriter responseWriter;
@@ -51,19 +45,14 @@ public class RequestsServletTest {
5145
@Before
5246
public void setUp() throws Exception {
5347
MockitoAnnotations.initMocks(this);
54-
helper.setUp();
5548

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

6053
servletUnderTest = new RequestsServlet();
6154
}
62-
63-
@After public void tearDown() {
64-
helper.tearDown();
65-
}
66-
55+
6756
@Test
6857
public void doGet_writesResponse() throws Exception {
6958
servletUnderTest.doGet(mockRequest, mockResponse);

0 commit comments

Comments
 (0)