- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for MockedHttpResponse (0.21 sec)
-
platforms/software/resources-http/src/test/groovy/org/gradle/internal/resource/transport/http/AbstractHttpClientTest.groovy
abstract class AbstractHttpClientTest extends Specification { MockedHttpResponse mockedHttpResponse() { CloseableHttpResponse response = Mock() mockedHttpResponse(response) } MockedHttpResponse mockedHttpResponse(CloseableHttpResponse response) { HttpEntity entity = Mock() InputStream content = Mock() new MockedHttpResponse(entity: entity, content: content, response: response) }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 12 19:38:08 UTC 2023 - 1.9K bytes - Viewed (0) -
platforms/software/resources-http/src/test/groovy/org/gradle/internal/resource/transport/http/HttpResourceUploaderTest.groovy
def 'uploader closes the request'() { given: HttpClientHelper client = Mock() ReadableContent resource = Mock() MockedHttpResponse mockedHttpResponse = mockedHttpResponse() def uri = new URI("http://somewhere.org/somehow") def name = new ExternalResourceName(uri) when: new HttpResourceUploader(client).upload(resource, name)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 12 19:38:08 UTC 2023 - 1.5K bytes - Viewed (0) -
platforms/software/resources-http/src/test/groovy/org/gradle/internal/resource/transport/http/HttpClientHelperTest.groovy
client.client = httpClient MockedHttpResponse mockedHttpResponse = mockedHttpResponse() when: client.performRequest(new HttpGet("http://gradle.org"), false) then: interaction { 1 * httpClient.execute(_, _) >> mockedHttpResponse.response assertIsClosedCorrectly(mockedHttpResponse) } }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 12 19:38:08 UTC 2023 - 3.4K bytes - Viewed (0) -
platforms/software/resources-http/src/test/groovy/org/gradle/internal/resource/transport/http/HttpResponseResourceTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 12 19:38:08 UTC 2023 - 2.9K bytes - Viewed (0)