Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 313 for mock (0.26 sec)

  1. maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4Test.java

    import static org.junit.jupiter.api.Assertions.assertSame;
    import static org.junit.jupiter.api.Assertions.assertThrows;
    import static org.junit.jupiter.api.Assertions.assertTrue;
    import static org.mockito.Mockito.mock;
    
    /**
     */
    public class PluginParameterExpressionEvaluatorV4Test extends AbstractCoreMavenComponentTestCase {
        private static final String FS = File.separator;
    
        @Inject
        PlexusContainer container;
    
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/platform/Jdk9PlatformTest.kt

        platform.assumeJdk9()
        val applicationProtocolUnsupported =
          object : DelegatingSSLSocket(null) {
            override fun getApplicationProtocol(): String {
              throw UnsupportedOperationException("Mock exception")
            }
          }
        assertThat(Jdk9Platform().getSelectedProtocol(applicationProtocolUnsupported)).isNull()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/Dispatcher.kt

     * limitations under the License.
     */
    package mockwebserver3
    
    import mockwebserver3.SocketPolicy.KeepOpen
    import okhttp3.ExperimentalOkHttpApi
    
    /** Handler for mock server requests. */
    @ExperimentalOkHttpApi
    abstract class Dispatcher {
      /**
       * Returns a response to satisfy `request`. This method may block (for instance, to wait on
       * a CountdownLatch).
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  4. analysis/analysis-api-fe10/tests/org/jetbrains/kotlin/analysis/api/fe10/test/configurator/AnalysisApiFe10TestServiceRegistrar.kt

     * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
     */
    
    package org.jetbrains.kotlin.analysis.api.fe10.test.configurator
    
    import com.intellij.mock.MockProject
    import org.jetbrains.kotlin.analysis.api.KtAnalysisApiInternals
    import org.jetbrains.kotlin.analysis.api.KtAnalysisNonPublicApi
    import org.jetbrains.kotlin.analysis.api.descriptors.CliFe10AnalysisFacade
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Wed Apr 10 16:23:23 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  5. maven-compat/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java

    import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
    import org.eclipse.aether.repository.LocalRepository;
    
    import static org.codehaus.plexus.testing.PlexusExtension.getBasedir;
    import static org.mockito.Mockito.mock;
    
    @PlexusTest
    @Deprecated
    public abstract class AbstractCoreMavenComponentTestCase {
    
        @Inject
        protected PlexusContainer container;
    
        @Inject
        protected RepositorySystem repositorySystem;
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 15:10:38 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  6. container-tests/src/test/java/okhttp3/containers/BasicLoomTest.kt

    import org.testcontainers.junit.jupiter.Testcontainers
    
    @Testcontainers
    @Isolated
    class BasicLoomTest {
      @JvmField
      @RegisterExtension
      val platform = PlatformRule()
    
      // Use mock server so we are strictly testing OkHttp client only in this test.
      // We should test MockWebServer later.
      @Container
      val mockServer: MockServerContainer = MockServerContainer(MOCKSERVER_IMAGE)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 11:15:46 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

      }
    
      @Test
      fun setResponseMockReason() {
        val reasons =
          arrayOf<String?>(
            "Mock Response",
            "Informational",
            "OK",
            "Redirection",
            "Client Error",
            "Server Error",
            "Mock Response",
          )
        for (i in 0..599) {
          val builder = MockResponse.Builder().code(i)
          val expectedReason = reasons[i / 100]
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  8. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      }
    
      @Test
      fun setResponseMockReason() {
        val reasons =
          arrayOf(
            "Mock Response",
            "Informational",
            "OK",
            "Redirection",
            "Client Error",
            "Server Error",
            "Mock Response",
          )
        for (i in 0..599) {
          val response = MockResponse().setResponseCode(i)
          val expectedReason = reasons[i / 100]
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  9. mockwebserver/README.md

      server.shutdown();
    }
    ```
    
    Your unit tests might move the `server` into a field so you can shut it down
    from your test's `tearDown()`.
    
    ### API
    
    #### MockResponse
    
    Mock responses default to an empty response body and a `200` status code.
    You can set a custom body with a string, input stream or byte array. Also
    add headers with a fluent builder API.
    
    ```java
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  10. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

    import okhttp3.Headers.Companion.headersOf
    import okhttp3.WebSocketListener
    import okhttp3.internal.addHeaderLenient
    import okhttp3.internal.http2.Settings
    import okio.Buffer
    
    /** A scripted response to be replayed by the mock web server. */
    @ExperimentalOkHttpApi
    class MockResponse {
      /** Returns the HTTP response line, such as "HTTP/1.1 200 OK". */
      val status: String
    
      val code: Int
        get() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
Back to top