/external/nanohttpd/core/src/test/java/fi/iki/elonen/ |
D | HttpHeadRequestTest.java | 51 this.testServer.response = NanoHTTPD.newFixedLengthResponse(responseBody); in setUp() 57 assertTrue(this.testServer.decodedParamters.get("foo") instanceof List); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 58 assertEquals(0, this.testServer.decodedParamters.get("foo").size()); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 59 assertTrue(this.testServer.decodedParamters.get("bar") instanceof List); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 60 assertEquals(1, this.testServer.decodedParamters.get("bar").size()); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 61 assertEquals("", this.testServer.decodedParamters.get("bar").get(0)); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 67 assertTrue(this.testServer.decodedParamters.get("foo") instanceof List); in testDecodingMixtureOfParameters() 68 assertEquals(2, this.testServer.decodedParamters.get("foo").size()); in testDecodingMixtureOfParameters() 69 assertEquals("bar", this.testServer.decodedParamters.get("foo").get(0)); in testDecodingMixtureOfParameters() 70 assertEquals("baz", this.testServer.decodedParamters.get("foo").get(1)); in testDecodingMixtureOfParameters() [all …]
|
D | HttpGetRequestTest.java | 50 assertTrue(this.testServer.decodedParamters.get("foo") instanceof List); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 51 assertEquals(0, this.testServer.decodedParamters.get("foo").size()); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 52 assertTrue(this.testServer.decodedParamters.get("bar") instanceof List); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 53 assertEquals(1, this.testServer.decodedParamters.get("bar").size()); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 54 assertEquals("", this.testServer.decodedParamters.get("bar").get(0)); in testDecodingFieldWithEmptyValueAndFieldWithMissingValueGiveDifferentResults() 60 assertTrue(this.testServer.decodedParamters.get("foo") instanceof List); in testDecodingMixtureOfParameters() 61 assertEquals(2, this.testServer.decodedParamters.get("foo").size()); in testDecodingMixtureOfParameters() 62 assertEquals("bar", this.testServer.decodedParamters.get("foo").get(0)); in testDecodingMixtureOfParameters() 63 assertEquals("baz", this.testServer.decodedParamters.get("foo").get(1)); in testDecodingMixtureOfParameters() 64 assertTrue(this.testServer.decodedParamters.get("zot") instanceof List); in testDecodingMixtureOfParameters() [all …]
|
D | InvalidRequestTest.java | 46 assertNotNull(this.testServer.parms); in testGetRequestWithoutProtocol() 47 assertTrue(this.testServer.header.size() > 0); in testGetRequestWithoutProtocol() 48 assertNotNull(this.testServer.files); in testGetRequestWithoutProtocol() 49 assertNotNull(this.testServer.uri); in testGetRequestWithoutProtocol() 56 assertNotNull(this.testServer.parms); in testGetRequestWithProtocol() 57 assertTrue(this.testServer.header.size() > 0); in testGetRequestWithProtocol() 58 assertNotNull(this.testServer.files); in testGetRequestWithProtocol() 59 assertNotNull(this.testServer.uri); in testGetRequestWithProtocol() 65 assertNotNull(this.testServer.parms); in testPostRequestWithoutProtocol() 66 assertTrue(this.testServer.header.size() > 0); in testPostRequestWithoutProtocol() [all …]
|
D | HttpPostRequestTest.java | 94 assertEquals(1, this.testServer.parms.size()); in testPostWithMultipartFormUpload() 95 …BufferedReader reader = new BufferedReader(new FileReader(this.testServer.files.get(HttpPostReques… in testPostWithMultipartFormUpload() 110 String fileNameAfter = new ArrayList<String>(this.testServer.parms.values()).get(0); in testPostWithMultipartFormUploadFilenameHasSpaces() 129 assertEquals(2, this.testServer.parms.size()); in testPostWithMultipleMultipartFormFields() 130 … assertEquals(HttpPostRequestTest.VALUE, this.testServer.parms.get(HttpPostRequestTest.FIELD)); in testPostWithMultipleMultipartFormFields() 131 … assertEquals(HttpPostRequestTest.VALUE2, this.testServer.parms.get(HttpPostRequestTest.FIELD2)); in testPostWithMultipleMultipartFormFields() 148 assertEquals(2, this.testServer.parms.size()); in testPostWithMultipleMultipartFormFieldsWhereContentTypeWasSeparatedByComma() 149 … assertEquals(HttpPostRequestTest.VALUE, this.testServer.parms.get(HttpPostRequestTest.FIELD)); in testPostWithMultipleMultipartFormFieldsWhereContentTypeWasSeparatedByComma() 150 … assertEquals(HttpPostRequestTest.VALUE2, this.testServer.parms.get(HttpPostRequestTest.FIELD2)); in testPostWithMultipleMultipartFormFieldsWhereContentTypeWasSeparatedByComma() 166 assertEquals(1, this.testServer.parms.size()); in testSimplePostWithSingleMultipartFormField() [all …]
|
D | SSLServerSocketFactoryTest.java | 62 Assert.assertEquals(9043, this.testServer.getListeningPort()); in testSSLConnection() 63 Assert.assertTrue(this.testServer.isAlive()); in testSSLConnection() 69 this.testServer = new TestServer(9043); in setUp() 70 …this.testServer.setServerSocketFactory(new SecureServerSocketFactory(NanoHTTPD.makeSSLSocketFactor… in setUp() 72 this.testServer.start(); in setUp() 76 while (!this.testServer.wasStarted()) { in setUp() 88 this.testServer.stop(); in tearDown()
|
D | HttpSSLServerTest.java | 61 Assert.assertEquals(9043, this.testServer.getListeningPort()); in testSSLConnection() 62 Assert.assertTrue(this.testServer.isAlive()); in testSSLConnection() 68 this.testServer = new TestServer(9043); in setUp() 69 …this.testServer.makeSecure(NanoHTTPD.makeSSLSocketFactory("/keystore.jks", "password".toCharArray(… in setUp() 71 this.testServer.start(); in setUp() 75 while (!this.testServer.wasStarted()) { in setUp() 87 this.testServer.stop(); in tearDown()
|
D | HttpDeleteRequestTest.java | 45 …this.testServer.response = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.NO_CONTENT, … in testDeleteRequestThatDoesntSendBackResponseBody_EmptyString() 63 …this.testServer.response = NanoHTTPD.newChunkedResponse(NanoHTTPD.Response.Status.NO_CONTENT, Nano… in testDeleteRequestThatDoesntSendBackResponseBody_NullInputStream() 81 …this.testServer.response = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.NO_CONTENT, … in testDeleteRequestThatDoesntSendBackResponseBody_NullString() 99 …this.testServer.response = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.ACCEPTED, "a… in testDeleteRequestThatSendsBackResponseBody_Accepted() 118 …this.testServer.response = NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Response.Status.OK, "applica… in testDeleteRequestThatSendsBackResponseBody_Success()
|
D | HttpParsingTest.java | 46 assertEquals(expected, this.testServer.decodePercent(input)); in testMultibyteCharacterSupport() 55 assertEquals("" + expected, this.testServer.decodePercent(input)); in testNormalCharacters() 61 assertEquals("foo bar", this.testServer.decodePercent("foo+bar")); in testPlusInQueryParams()
|
D | HttpServerTest.java | 131 protected TestServer testServer; field in HttpServerTest 156 …NanoHTTPD.HTTPSession session = this.testServer.createSession(this.tempFileManager, inputStream, o… in invokeServer() 180 this.testServer = new TestServer(); in setUp() 191 assertNotNull(this.testServer); in testServerExists()
|
D | HttpPutRequestTest.java | 62 assertTrue(this.testServer.files.containsKey("content")); in testPutRequestSendsContent() 69 reader = new BufferedReader(new FileReader(this.testServer.files.get("content"))); in testPutRequestSendsContent()
|
D | HttpChunkedResponseTest.java | 88 this.testServer.response = new NanoHTTPD(0) { in thatChunkedContentIsChunked() 90 this.testServer.response.setChunkedTransfer(true); in thatChunkedContentIsChunked()
|
D | HttpSessionHeadersTest.java | 63 …NanoHTTPD.HTTPSession session = this.testServer.createSession(HttpSessionHeadersTest.TEST_TEMP_FIL… in testHeadersRemoteIp()
|
D | HttpKeepAliveTest.java | 98 …NanoHTTPD.HTTPSession session = HttpKeepAliveTest.this.testServer.createSession(tempFileManager, i… in testManyRequests()
|
/external/python/cpython3/Lib/test/ |
D | test_smtpnet.py | 23 testServer = 'smtp.gmail.com' variable in SmtpTest 31 with support.transient_internet(self.testServer): 32 server = smtplib.SMTP(self.testServer, self.remotePort) 45 testServer = 'smtp.gmail.com' variable in SmtpSSLTest 50 with support.transient_internet(self.testServer): 51 server = smtplib.SMTP_SSL(self.testServer, self.remotePort) 57 with support.transient_internet(self.testServer): 58 server = smtplib.SMTP_SSL(self.testServer) 67 with support.transient_internet(self.testServer): 68 server = smtplib.SMTP_SSL(self.testServer, self.remotePort, context=context) [all …]
|
/external/nanohttpd/core/src/test/java/fi/iki/elonen/integration/ |
D | GZipIntegrationTest.java | 84 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in contentEncodingShouldBeAddedToFixedLengthResponses() 96 …testServer.response = NanoHTTPD.newChunkedResponse(NanoHTTPD.Response.Status.OK, "text/plain", dat… in contentEncodingShouldBeAddedToChunkedResponses() 107 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in shouldFindCorrectAcceptEncodingAmongMany() 118 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in contentLengthShouldBeRemovedFromZippedResponses() 128 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in fixedLengthContentIsEncodedProperly() 138 …testServer.response = NanoHTTPD.newChunkedResponse(NanoHTTPD.Response.Status.OK, "text/plain", dat… in chunkedContentIsEncodedProperly() 147 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in noGzipWithoutAcceptEncoding() 157 testServer.response = NanoHTTPD.newFixedLengthResponse("This is a test"); in contentShouldNotBeGzippedIfContentLengthIsAddedManually() 158 … testServer.response.addHeader("Content-Length", "" + ("This is a test".getBytes("UTF-8").length)); in contentShouldNotBeGzippedIfContentLengthIsAddedManually()
|
D | IntegrationTestBase.java | 51 protected T testServer; field in IntegrationTestBase 57 this.testServer = createTestServer(); in setUp() 60 this.testServer.start(); in setUp() 69 this.testServer.stop(); in tearDown()
|
D | GetAndPostIntegrationTest.java | 103 this.testServer.response = "testGetRequestWithParameters"; in testGetRequestWithParameters() 114 this.testServer.response = "testPostRequestWithFormEncodedParameters"; in testPostRequestWithFormEncodedParameters() 130 this.testServer.response = "testPostRequestWithMultipartEncodedParameters"; in testPostRequestWithMultipartEncodedParameters() 146 this.testServer.response = "testPostWithNoParameters"; in testPostWithNoParameters() 157 this.testServer.response = "testSimpleGetRequest"; in testSimpleGetRequest() 168 this.testServer.response = "testPostRequestWithMultipartEncodedParameters"; in testPostRequestWithMultipartExtremEncodedParameters()
|
D | CookieIntegrationTest.java | 87 this.testServer.cookiesToSend.add(new NanoHTTPD.Cookie("name", "value", 30)); in testCookieSentBackToClient() 120 assertEquals(1, this.testServer.cookiesReceived.size()); in testServerReceivesCookiesSentFromClient() 121 assertTrue(this.testServer.cookiesReceived.get(0).getHTTPHeader().contains("name=value")); in testServerReceivesCookiesSentFromClient()
|
/external/python/cpython2/Lib/test/ |
D | test_smtpnet.py | 8 testServer = 'smtp.gmail.com' variable in SmtpSSLTest 13 with test_support.transient_internet(self.testServer): 14 server = smtplib.SMTP_SSL(self.testServer, self.remotePort) 20 with test_support.transient_internet(self.testServer): 21 server = smtplib.SMTP_SSL(self.testServer)
|
/external/nanohttpd/fileupload/src/test/java/fi/iki/elonen/ |
D | TestNanoFileUpLoad.java | 82 protected TestServer testServer; field in TestNanoFileUpLoad 183 FileItem file = this.testServer.files.get("upfile").get(0); in testPostWithMultipartFormUpload1() 194 FileItem file = this.testServer.files.get("upfile").get(0); in testPostWithMultipartFormUpload2() 205 FileItem file = this.testServer.files.get("upfile").get(0); in testPostWithMultipartFormUpload3() 226 this.testServer = new TestServer(); in setUp() 227 this.testServer.start(); in setUp() 231 while (!this.testServer.wasStarted()) { in setUp() 243 this.testServer.stop(); in tearDown()
|