Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 24 for thenReturn (0.16 sec)

  1. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

        // next map.get()
        when(backingMap.get(KEY)).thenReturn(existingZero);
        // since get returned zero, try a replace; that fails due to a simulated race
        when(backingMap.replace(eq(KEY), eq(existingZero), isA(AtomicInteger.class))).thenReturn(false);
        when(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).thenReturn(existing);
    
        // another map.get()
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  2. maven-core/src/test/java/org/apache/maven/internal/transformation/impl/ConsumerPomArtifactTransformerTest.java

            SessionData sessionDataMock = Mockito.mock(SessionData.class);
            when(systemSessionMock.getData()).thenReturn(sessionDataMock);
            when(sessionDataMock.get(any())).thenReturn(new NoTransformerContext());
    
            Path beforePomFile =
                    Paths.get("src/test/resources/projects/transform/before.pom").toAbsolutePath();
            Path afterPomFile =
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Tue Dec 05 09:23:26 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/ForwardingCacheTest.java

        verify(mock).invalidateAll();
      }
    
      public void testSize() {
        when(mock.size()).thenReturn(0L);
        assertEquals(0, forward.size());
      }
    
      public void testStats() {
        when(mock.stats()).thenReturn(null);
        assertNull(forward.stats());
      }
    
      public void testAsMap() {
        when(mock.asMap()).thenReturn(null);
        assertNull(forward.asMap());
      }
    
      public void testCleanUp() {
    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)
  4. maven-core/src/test/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListenerTest.java

            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);
            when(nonLocalReposioryArtifact.getFile()).thenReturn(new File("something/completely/different"));
    
            assertThat(
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Sat Apr 15 17:24:20 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        ExecutorService service = mock(ExecutorService.class);
        when(service.awaitTermination(HALF_SECOND_NANOS, NANOSECONDS))
            .thenReturn(false)
            .thenReturn(true);
        when(service.isTerminated()).thenReturn(true);
        assertTrue(shutdownAndAwaitTermination(service, 1L, SECONDS));
        verify(service).shutdown();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  6. maven-core/src/test/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilterTest.java

        void setup() {
            artifact = mock(Artifact.class);
            when(artifact.getGroupId()).thenReturn("org.apache.maven");
            when(artifact.getArtifactId()).thenReturn("maven-core");
    
            artifact2 = mock(Artifact.class);
            when(artifact2.getGroupId()).thenReturn("org.junit.jupiter");
            when(artifact2.getArtifactId()).thenReturn("junit-jupiter-engine");
        }
    
        @Test
        void testExcludeExact() {
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Tue Aug 29 15:25:58 GMT 2023
    - 6K bytes
    - Viewed (0)
  7. maven-core/src/test/java/org/apache/maven/graph/ProjectSelectorTest.java

            when(mavenExecutionRequest.getBaseDirectory()).thenReturn(null);
    
            final File baseDirectoryFromRequest = sut.getBaseDirectoryFromRequest(mavenExecutionRequest);
    
            assertThat(baseDirectoryFromRequest, nullValue());
        }
    
        @Test
        void getBaseDirectoryFromRequestWhenDirectoryIsValidReturnFile() {
            when(mavenExecutionRequest.getBaseDirectory()).thenReturn("path/to/file");
    
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Mon Dec 26 15:12:32 GMT 2022
    - 8.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java

      @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';
        HashingOutputStream out = new HashingOutputStream(hashFunction, buffer);
        out.write(b);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 3.1K bytes
    - Viewed (0)
  9. maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java

                lifeCycles.put(s, lifecycle);
            }
    
            PlexusContainer mockedContainer = mock(PlexusContainer.class);
            when(mockedContainer.lookupMap(Lifecycle.class)).thenReturn(lifeCycles);
    
            DefaultLifecycleRegistry reg = new DefaultLifecycleRegistry();
            return new DefaultLifecycles(reg, new DefaultLookup(mockedContainer));
        }
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java

      @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';
        HashingOutputStream out = new HashingOutputStream(hashFunction, buffer);
        out.write(b);
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 3.1K bytes
    - Viewed (0)
Back to top