Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 272 for mock (0.17 sec)

  1. cni/pkg/ipset/nldeps_mock.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package ipset
    
    import (
    	"net/netip"
    
    	"github.com/stretchr/testify/mock"
    )
    
    type MockedIpsetDeps struct {
    	mock.Mock
    }
    
    func FakeNLDeps() *MockedIpsetDeps {
    	return &MockedIpsetDeps{}
    }
    
    func (m *MockedIpsetDeps) ipsetIPPortCreate(name string) error {
    	args := m.Called(name)
    	return args.Error(0)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. istioctl/pkg/cli/mock_client.go

    Xiaopeng Han <******@****.***> 1709887099 +0800
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. istioctl/pkg/cli/mock_test.go

    Xiaopeng Han <******@****.***> 1686841337 +0800
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java

         * the type is irrelevant at runtime.
         */
        mock = mock(LoadingCache.class);
        forward =
            new ForwardingLoadingCache<String, Boolean>() {
              @Override
              protected LoadingCache<String, Boolean> delegate() {
                return mock;
              }
            };
      }
    
      public void testGet() throws ExecutionException {
        when(mock.get("key")).thenReturn(Boolean.TRUE);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java

         * the type is irrelevant at runtime.
         */
        mock = mock(LoadingCache.class);
        forward =
            new ForwardingLoadingCache<String, Boolean>() {
              @Override
              protected LoadingCache<String, Boolean> delegate() {
                return mock;
              }
            };
      }
    
      public void testGet() throws ExecutionException {
        when(mock.get("key")).thenReturn(Boolean.TRUE);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  6. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/source/model/MethodMetaDataTest.groovy

        }
    
        def locatesOverriddenMethodInAncestorClass() {
            ClassMetaData superClassMetaData = Mock()
            ClassMetaData ancestorClassMetaData = Mock()
            MethodMetaData overriddenMethod = Mock()
    
            when:
            def m = method.overriddenMethod
    
            then:
            m == overriddenMethod
            _ * owner.superClass >> superClassMetaData
    Groovy
    - Registered: Wed Apr 17 11:36:08 GMT 2024
    - Last Modified: Wed Dec 09 08:14:05 GMT 2020
    - 5.6K bytes
    - Viewed (0)
  7. 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;
                  }
                });
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jan 05 19:41:03 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java

         * the type is irrelevant at runtime.
         */
        mock = mock(Cache.class);
        forward =
            new ForwardingCache<String, Boolean>() {
              @Override
              protected Cache<String, Boolean> delegate() {
                return mock;
              }
            };
      }
    
      public void testGetIfPresent() throws ExecutionException {
        when(mock.getIfPresent("key")).thenReturn(Boolean.TRUE);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  9. 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);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  10. maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java

    class DefaultToolchainManagerPrivateTest {
        // Mocks to inject into toolchainManager
        @Mock
        private Logger logger;
    
        @InjectMocks
        private DefaultToolchainManagerPrivate toolchainManager;
    
        @Mock
        private ToolchainFactory toolchainFactory_basicType;
    
        @Mock
        private ToolchainFactory toolchainFactory_rareType;
    
        @BeforeEach
        void setUp() {
    
    Java
    - Registered: Sun Apr 21 03:35:09 GMT 2024
    - Last Modified: Sat Apr 15 17:24:20 GMT 2023
    - 5.7K bytes
    - Viewed (0)
Back to top