Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 593 for mock (0.15 sec)

  1. maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java

    import org.eclipse.aether.DefaultRepositoryCache;
    import org.eclipse.aether.DefaultRepositorySystemSession;
    import org.eclipse.aether.RepositorySystem;
    import org.junit.jupiter.api.BeforeEach;
    
    import static org.mockito.Mockito.mock;
    
    /**
     */
    @PlexusTest
    public abstract class AbstractMavenProjectTestCase {
        protected ProjectBuilder projectBuilder;
    
        @Inject
        protected MavenRepositorySystem repositorySystem;
    
        @Inject
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/testing-dependencies.md

    This provider might be charging you per request, and calling it might take some extra time than if you had a fixed mock user for tests.
    
    You probably want to test the external provider once, but not necessarily call it for every test that runs.
    
    In this case, you can override the dependency that calls that provider, and use a custom dependency that returns a mock user, only for your tests.
    
    ### Use the `app.dependency_overrides` attribute
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  3. maven-compat/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java

    import static org.codehaus.plexus.testing.PlexusExtension.getBasedir;
    import static org.junit.jupiter.api.Assertions.assertEquals;
    import static org.junit.jupiter.api.Assertions.assertTrue;
    import static org.mockito.Mockito.mock;
    
    /**
     */
    @Deprecated
    class ArtifactDeployerTest extends AbstractArtifactComponentTestCase {
        @Inject
        private ArtifactDeployer artifactDeployer;
    
        @Inject
        private SessionScope sessionScope;
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  4. istioctl/pkg/metrics/metrics_test.go

    	return promv1.AlertsResult{}, fmt.Errorf("TODO mockPromAPI doesn't mock Alerts")
    }
    
    func (client mockPromAPI) AlertManagers(ctx context.Context) (promv1.AlertManagersResult, error) {
    	return promv1.AlertManagersResult{}, fmt.Errorf("TODO mockPromAPI doesn't mock AlertManagers")
    }
    
    func (client mockPromAPI) CleanTombstones(ctx context.Context) error {
    	return nil
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Oct 25 02:07:44 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  5. maven-core/src/test/java/org/apache/maven/session/scope/SessionScopeProxyTest.java

    import org.codehaus.plexus.testing.PlexusTest;
    import org.eclipse.sisu.Typed;
    import org.junit.jupiter.api.Test;
    import org.junit.jupiter.api.extension.ExtendWith;
    import org.mockito.Mock;
    import org.mockito.junit.jupiter.MockitoExtension;
    
    import static org.junit.jupiter.api.Assertions.assertNotNull;
    import static org.junit.jupiter.api.Assertions.assertNotSame;
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Tue Apr 23 12:52:20 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. futures/listenablefuture1/src/com/google/common/util/concurrent/ListenableFuture.java

     * SettableFuture} or one of the methods in the {@link Futures#immediateFuture Futures.immediate*}
     * family. <b>Avoid</b> creating a mock or stub {@code Future}. Mock and stub implementations are
     * fragile because they assume that only certain methods will be called and because they often
     * implement subtleties of the API improperly.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:13:41 GMT 2023
    - 8K bytes
    - Viewed (0)
  7. 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)
  8. maven-compat/src/test/java/org/apache/maven/repository/legacy/WagonMock.java

     * specific language governing permissions and limitations
     * under the License.
     */
    package org.apache.maven.repository.legacy;
    
    import org.apache.maven.wagon.providers.file.FileWagon;
    
    /**
     * Mock of a Wagon for testing
     *
     */
    public class WagonMock extends FileWagon {
    
        /**
         * A field that can be configured in the Wagon
         *
         * @component.configuration default="configurableField"
         */
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/cni-watcher_test.go

    		Status: corev1.PodStatus{
    			PodIP: fakePodIP,
    		},
    	}
    	ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "funkyns"}}
    
    	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,
    		pod,
    		util.GetPodIPsIfPresent(pod),
    		valid.Netns,
    	).Return(nil)
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Feb 02 08:18:40 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  10. maven-core/src/test/java/org/apache/maven/graph/ProjectSelectorTest.java

    import static org.junit.jupiter.api.Assertions.assertThrows;
    import static org.mockito.Mockito.mock;
    import static org.mockito.Mockito.when;
    
    class ProjectSelectorTest {
        private final ProjectSelector sut = new ProjectSelector();
        private final MavenExecutionRequest mavenExecutionRequest = mock(MavenExecutionRequest.class);
    
        @Test
        void getBaseDirectoryFromRequestWhenDirectoryIsNullReturnNull() {
    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)
Back to top