Tabnine Logo
Invocation.proceed
Code IndexAdd Tabnine to your IDE (free)

How to use
proceed
method
in
mockit.Invocation

Best Java code snippets using mockit.Invocation.proceed (Showing top 10 results out of 315)

origin: jmockit/jmockit1

@Mock
public static <T> T getBean(@Nonnull Invocation invocation, @Nonnull String name, @Nullable Class<T> requiredType) {
 TestedClassInstantiations testedClasses = TestRun.getTestedClassInstantiations();
 if (testedClasses == null) {
   return invocation.proceed();
 }
 BeanExporter beanExporter = testedClasses.getBeanExporter();
 T bean = BeanLookup.getBean(beanExporter, name, requiredType);
 return bean;
}
origin: jmockit/jmockit1

@Mock
public static Object getBean(@Nonnull Invocation invocation, @Nonnull String name) {
 TestedClassInstantiations testedClasses = TestRun.getTestedClassInstantiations();
 if (testedClasses == null) {
   return invocation.proceed();
 }
 BeanExporter beanExporter = testedClasses.getBeanExporter();
 Object bean = BeanLookup.getBean(beanExporter, name);
 return bean;
}
origin: jmockit/jmockit1

  @Mock
  public static <T> T getBean(@Nonnull Invocation invocation, @Nonnull Class<T> requiredType) {
   TestedClassInstantiations testedClasses = TestRun.getTestedClassInstantiations();

   if (testedClasses == null) {
     return invocation.proceed();
   }

   BeanExporter beanExporter = testedClasses.getBeanExporter();
   T bean = BeanLookup.getBean(beanExporter, requiredType);
   return bean;
  }
}
origin: ldp4j/ldp4j

  @Mock
  public MediaType fromString(Invocation context, String aValue) {
    assertThat(aValue,equalTo(value));
    return context.proceed(aValue);
  }
};
origin: ldp4j/ldp4j

  @Mock
  public ImmutableMediaType fromString(Invocation context, String aValue, MediaRangeSyntax syntax) {
    assertThat(aValue,equalTo(mediaType));
    return context.proceed(aValue,syntax);
  }
};
origin: jmockit/jmockit1

  @Mock
  public static ExtensionRegistry createRegistryWithDefaultExtensions(Invocation inv, ConfigurationParameters configParams) {
   ExtensionRegistry registry = inv.proceed();
   assert registry != null;

   Extension extension = new JMockitExtension();
   registry.registerExtension(extension, extension);

   return registry;
  }
}
origin: cloudant/java-cloudant

@Mock
public String getProperty(Invocation inv, String key) {
  if (key.equals("com.cloudant.client.iamserver")) {
    return mockIamTokenEndpointUrl.get();
  }
  return inv.proceed(key);
}
origin: cloudant/java-cloudant

  @Mock
  public String getProperty(Invocation inv, String key, String def) {
    if (key.equals("com.cloudant.client.iamserver")) {
      return mockIamTokenEndpointUrl.get();
    }
    return inv.proceed(key, def);
  }
}
origin: ldp4j/ldp4j

  @Mock
  public Language fromString(Invocation context, String aValue) {
    assertThat(aValue,equalTo(value));
    return context.proceed(aValue);
  }
};
origin: ldp4j/ldp4j

  @Mock
  public CharacterEncoding fromString(Invocation context, String aValue) {
    assertThat(aValue,equalTo(expected.name()));
    return context.proceed(aValue);
  }
};
mockitInvocationproceed

Javadoc

Allows execution to proceed into the real implementation of the target method/constructor.

In the case of a method, the real implementation is executed with the argument values originally received or explicitly given as replacement. Whatever comes out (either a return value or a thrown exception/error) becomes the result for this execution of the method.

In the case of a constructor, the real constructor implementation code which comes after the necessary call to "super" is executed, using the original argument values; replacement arguments are not supported. If the execution of said code throws an exception or error, it is propagated out to the caller of the target constructor. Contrary to proceeding into a method, it's not possible to actually execute test code inside the delegate or fake method after proceeding into the real constructor, nor to proceed into it more than once.

Popular methods of Invocation

  • getInvokedInstance
    Returns the target instance on which the current invocation was made, if any (if the method invoked
  • getMaxInvocations
    Returns the maximum invocation count for the current expectation (-1 indicates unlimited). This call
  • getMinInvocations
    Returns the minimum invocation count for the current expectation. This call will return the value sp

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Reference (javax.naming)
  • JFileChooser (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now