Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 502 for Mock (0.06 sec)

  1. guava-tests/test/com/google/common/hash/FunnelsTest.java

        PrimitiveSink primitiveSink = mock(PrimitiveSink.class);
        Funnels.byteArrayFunnel().funnel(new byte[] {4, 3, 2, 1}, primitiveSink);
        verify(primitiveSink).putBytes(new byte[] {4, 3, 2, 1});
      }
    
      public void testForBytes_null() {
        assertNullsThrowException(Funnels.byteArrayFunnel());
      }
    
      public void testForStrings() {
        PrimitiveSink primitiveSink = mock(PrimitiveSink.class);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/JavadocLinkConverterTest.groovy

    class JavadocLinkConverterTest extends XmlSpecification {
        final LinkRenderer linkRenderer = Mock()
        final TypeNameResolver nameResolver = Mock()
        final ClassMetaData classMetaData = Mock()
        final ClassMetaDataRepository<ClassMetaData> repository = Mock()
        final GenerationListener listener = Mock()
        final JavadocLinkConverter converter = new JavadocLinkConverter(document, nameResolver, linkRenderer, repository)
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 8.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/FlushablesTest.java

        // 'swallowException' when the mock does not throw an exception.
        setupFlushable(false);
        doFlush(mockFlushable, false, false);
    
        setupFlushable(false);
        doFlush(mockFlushable, true, false);
      }
    
      public void testFlush_flushableWithEatenException() throws IOException {
        // make sure that no exception is thrown if 'swallowException' is true
        // when the mock does throw an exception on flush.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java

                  public T apply(Object delegate) {
                    T mock = mock(forwarderClass, CALLS_REAL_METHODS);
                    try {
                      T stubber = doReturn(delegate).when(mock);
                      DELEGATE_METHOD.invoke(stubber);
                    } catch (Exception e) {
                      throw new RuntimeException(e);
                    }
                    return mock;
                  }
                });
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 05 19:41:03 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/CloseablesTest.java

        // 'swallowException' when the mock does not throw an exception.
        setupCloseable(false);
        doClose(mockCloseable, false, false);
    
        setupCloseable(false);
        doClose(mockCloseable, true, false);
      }
    
      public void testClose_closeableWithEatenException() throws IOException {
        // make sure that no exception is thrown if 'swallowException' is true
        // when the mock does throw an exception.
        setupCloseable(true);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/UncaughtExceptionHandlersTest.java

    import static org.mockito.Mockito.mock;
    import static org.mockito.Mockito.verify;
    
    import com.google.common.util.concurrent.UncaughtExceptionHandlers.Exiter;
    import junit.framework.TestCase;
    
    /** @author Gregory Kick */
    public class UncaughtExceptionHandlersTest extends TestCase {
    
      private Runtime runtimeMock;
    
      @Override
      protected void setUp() {
        runtimeMock = mock(Runtime.class);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  7. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/ClassDocMethodsBuilderTest.groovy

                def doc = new ClassDoc('org.gradle.Class', content, document, classMetaData, null)
                new ClassDocPropertiesBuilder(javadocConverter, Mock(GenerationListener)).build(doc)
                new ClassDocMethodsBuilder(javadocConverter, Mock(GenerationListener)).build(doc)
                doc
            }
    
            then:
            doc.classProperties.size() == 2
            doc.classProperties[0].name == 'block'
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 8.4K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/informers_test.go

    	client := kube.NewFakeClient(ns, pod)
    
    	// We are expecting at most 1 calls to the mock, wait for them
    	wg, waitForMockCalls := NewWaitForNCalls(t, 1)
    	fs := &fakeServer{testWG: wg}
    
    	fs.On("AddPodToMesh",
    		ctx,
    		mock.IsType(pod),
    		util.GetPodIPsIfPresent(pod),
    		"",
    	).Return(nil)
    
    	server := getFakeDP(fs, client.Kube())
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Oct 09 16:05:45 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  9. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/JavadocConverterTest.groovy

    import gradlebuild.docs.dsl.source.model.MethodMetaData
    
    class JavadocConverterTest extends XmlSpecification {
        final ClassMetaData classMetaData = Mock()
        final JavadocLinkConverter linkConverter = Mock()
        final GenerationListener listener = Mock()
        final JavadocConverter parser = new JavadocConverter(document, linkConverter)
    
        def respectsLineIndentation() {
            _ * classMetaData.rawCommentText >> '''
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 14.2K bytes
    - Viewed (0)
  10. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/source/model/TypeMetaDataTest.groovy

        }
    
        def visitsSignature() {
            TypeMetaData.SignatureVisitor visitor = Mock()
    
            when:
            type.visitSignature(visitor)
    
            then:
            1 * visitor.visitType('org.gradle.SomeType')
            0 * visitor._
        }
    
        def visitsSignatureForArrayType() {
            TypeMetaData.SignatureVisitor visitor = Mock()
            type.arrayDimensions = 2
    
            when:
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 4.6K bytes
    - Viewed (0)
Back to top