Searched refs:httpUrlConnection (Results 1 – 5 of 5) sorted by relevance
77 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendEventReport() local80 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendEventReport()81 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendEventReport()89 Mockito.doReturn(httpUrlConnection).when(spyEventReportSender) in testSendEventReport()104 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendEventReportWithExtraHeaders() local107 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendEventReportWithExtraHeaders()108 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendEventReportWithExtraHeaders()116 Mockito.doReturn(httpUrlConnection) in testSendEventReportWithExtraHeaders()128 verify(httpUrlConnection) in testSendEventReportWithExtraHeaders()
89 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendAggregateReport() local92 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendAggregateReport()93 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendAggregateReport()104 Mockito.doReturn(httpUrlConnection).when(spyAggregateReportSender) in testSendAggregateReport()119 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendAggregateReportWithExtraHeaders() local122 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendAggregateReportWithExtraHeaders()123 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendAggregateReportWithExtraHeaders()134 Mockito.doReturn(httpUrlConnection) in testSendAggregateReportWithExtraHeaders()146 verify(httpUrlConnection) in testSendAggregateReportWithExtraHeaders()
40 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendDebugReport() local43 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendDebugReport()44 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendDebugReport()52 Mockito.doReturn(httpUrlConnection) in testSendDebugReport()
128 HttpURLConnection httpUrlConnection = null; in sendRequestAsInputStream() local131 httpUrlConnection = (HttpURLConnection) url.openConnection(); in sendRequestAsInputStream()132 setMethodAndHeaders(httpUrlConnection, requestMethod, headers); in sendRequestAsInputStream()133 int responseCode = httpUrlConnection.getResponseCode(); in sendRequestAsInputStream()139 InputStream is = httpUrlConnection.getInputStream(); in sendRequestAsInputStream()141 is = new HttpInputStreamWrapper(httpUrlConnection, is); in sendRequestAsInputStream()149 if (httpUrlConnection != null && !isSuccess) { in sendRequestAsInputStream()150 httpUrlConnection.disconnect(); in sendRequestAsInputStream()268 final HttpURLConnection httpUrlConnection; field in HttpFetcher.HttpInputStreamWrapper273 httpUrlConnection = conn; in HttpInputStreamWrapper()[all …]
867 HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection; in maybeDisconnect() local868 httpUrlConnection.disconnect(); in maybeDisconnect()