- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 594 for mock (0.2 sec)
-
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 12 12:43:09 GMT 2024 - Last Modified: Mon Apr 17 12:41:04 GMT 2023 - 3.1K bytes - Viewed (0) -
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 12 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4K bytes - Viewed (0) -
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:
Groovy - Registered: Wed Apr 17 11:36:08 GMT 2024 - Last Modified: Wed Dec 09 08:14:05 GMT 2020 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
} @AndroidIncompatible // Mocking ExecutorService is forbidden there. TODO(b/218700094): Don't mock. public void testGetExitingExecutorService_executorDelegatesToOriginal() { TestApplication application = new TestApplication(); ThreadPoolExecutor executor = mock(ThreadPoolExecutor.class); ThreadFactory threadFactory = mock(ThreadFactory.class); when(executor.getThreadFactory()).thenReturn(threadFactory);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 28.2K bytes - Viewed (0) -
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 14 03:35:08 GMT 2024 - Last Modified: Sat Apr 15 17:24:20 GMT 2023 - 5.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
} @AndroidIncompatible // Mocking ExecutorService is forbidden there. TODO(b/218700094): Don't mock. public void testGetExitingExecutorService_executorDelegatesToOriginal() { TestApplication application = new TestApplication(); ThreadPoolExecutor executor = mock(ThreadPoolExecutor.class); ThreadFactory threadFactory = mock(ThreadFactory.class); when(executor.getThreadFactory()).thenReturn(threadFactory);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 28.2K bytes - Viewed (3) -
guava-tests/test/com/google/common/util/concurrent/WrappingScheduledExecutorServiceTest.java
}; public void testSchedule() { MockExecutor mock = new MockExecutor(); TestExecutor testExecutor = new TestExecutor(mock); @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored Future<?> possiblyIgnoredError = testExecutor.schedule(DO_NOTHING, 10, TimeUnit.MINUTES); mock.assertLastMethodCalled("scheduleRunnable", 10, TimeUnit.MINUTES);
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Wed Dec 16 19:54:45 GMT 2020 - 7.6K bytes - Viewed (0) -
maven-core/src/test/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListenerTest.java
RepositorySystemSession session = mock(RepositorySystemSession.class); when(session.getLocalRepository()).thenReturn(localRepository); Artifact localRepositoryArtifact = mock(Artifact.class); when(localRepositoryArtifact.getFile()).thenReturn(new File(baseDir, "some/path/within")); Artifact nonLocalReposioryArtifact = mock(Artifact.class);
Java - Registered: Sun Apr 14 03:35:08 GMT 2024 - Last Modified: Sat Apr 15 17:24:20 GMT 2023 - 4.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java
private final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); @SuppressWarnings("DoNotMock") @Override protected void setUp() throws Exception { super.setUp(); hasher = mock(Hasher.class); hashFunction = mock(HashFunction.class); when(hashFunction.newHasher()).thenReturn(hasher); } public void testWrite_putSingleByte() throws Exception { int b = 'q';
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Fri Oct 02 16:24:50 GMT 2020 - 3.1K bytes - Viewed (0) -
cni/pkg/nodeagent/informers_test.go
// See the License for the specific language governing permissions and // limitations under the License. package nodeagent import ( "context" "fmt" "testing" "time" "github.com/stretchr/testify/mock" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "istio.io/istio/cni/pkg/util" "istio.io/istio/pkg/config/constants" "istio.io/istio/pkg/kube"
Go - Registered: Wed Apr 17 22:53:10 GMT 2024 - Last Modified: Thu Feb 08 01:03:24 GMT 2024 - 15.8K bytes - Viewed (0)