Tabnine Logo
Consumer
Code IndexAdd Tabnine to your IDE (free)

How to use
Consumer
in
au.com.dius.pact.model

Best Java code snippets using au.com.dius.pact.model.Consumer (Showing top 16 results out of 315)

origin: org.arquillian.pact/arquillian-pact-provider-core

@Override
public void testInteraction() {
  if (this.currentConsumer == null || this.currentRequestResponseInteraction == null) {
    throw new IllegalArgumentException("Current Consumer or Current Request Response Interaction has not been set.");
  }
  try {
    testInteraction(this.currentConsumer.getName(), this.currentRequestResponseInteraction);
  } finally {
    // Each run should provide a new pair of objects.
    resetCurrentFields();
  }
}
origin: au.com.dius/pact-jvm-consumer_2.11

/**
 * Creates a new instance of {@link MessagePactBuilder}
 *
 * @param consumer
 */
private MessagePactBuilder(String consumer) {
 this.consumer = new Consumer(consumer);
}
origin: org.arquillian.pact/arquillian-pact-provider-core

@Override
public void testInteraction(URL url) {
  if (this.currentConsumer == null || this.currentRequestResponseInteraction == null) {
    throw new IllegalArgumentException("Current Consumer or Current Request Response Interaction has not been set.");
  }
  try {
    testInteraction(url, this.currentConsumer.getName(), this.currentRequestResponseInteraction);
  } finally {
    // Each run should provide a new pair of objects.
    resetCurrentFields();
  }
}
origin: au.com.dius/pact-jvm-consumer

/**
 * Creates a new instance of {@link MessagePactBuilder}
 *
 * @param consumer
 */
private MessagePactBuilder(String consumer) {
 this.consumer = new Consumer(consumer);
}
origin: org.arquillian.algeron/arquillian-algeron-pact-provider-core

@Override
public void testInteraction(URL url) {
  if (this.currentConsumer == null || this.currentRequestResponseInteraction == null) {
    throw new IllegalArgumentException(
      "Current Consumer or Current Request Response Interaction has not been set.");
  }
  try {
    testInteraction(url, this.currentConsumer.getName(), this.currentRequestResponseInteraction);
  } finally {
    // Each run should provide a new pair of objects.
    resetCurrentFields();
  }
}
origin: au.com.dius/pact-jvm-consumer_2.11

this.consumer = new Consumer(consumerName);
this.provider = new Provider(providerName);
origin: org.arquillian.algeron/arquillian-algeron-pact-provider-core

@Override
public void testInteraction() {
  if (this.currentConsumer == null || this.currentRequestResponseInteraction == null) {
    throw new IllegalArgumentException(
      "Current Consumer or Current Request Response Interaction has not been set.");
  }
  try {
    testInteraction(this.currentConsumer.getName(), this.currentRequestResponseInteraction);
  } finally {
    // Each run should provide a new pair of objects.
    resetCurrentFields();
  }
}
origin: au.com.dius/pact-jvm-consumer

this.consumer = new Consumer(consumerName);
this.provider = new Provider(providerName);
origin: au.com.dius/pact-jvm-provider-junit_2.11

protected Description describeChild(final Interaction interaction) {
 if (!childDescriptions.containsKey(interaction)) {
   childDescriptions.put(interaction, Description.createTestDescription(testClass.getJavaClass(),
    pact.getConsumer().getName() + " - " + interaction.getDescription()));
 }
 return childDescriptions.get(interaction);
}
origin: org.arquillian.pact/arquillian-pact-provider-core

protected List<Pact> getPacts(BeforeClass test) {
  final TestClass testClass = test.getTestClass();
  final Provider providerInfo = testClass.getAnnotation(Provider.class);
  if (providerInfo == null) {
    throw new IllegalArgumentException(String.format("Provider name should be set by using %s",Provider.class.getName()));
  }
  final String serviceName = providerInfo.value();
  final Consumer consumerInfo = testClass.getAnnotation(Consumer.class);
  final String consumerName = consumerInfo != null ? consumerInfo.value() : null;
  List<Pact> pacts = new ArrayList<>();
  try {
    pacts = getPactSource(testClass).load(serviceName).stream()
        .filter(p -> consumerName == null || p.getConsumer().getName().equals(consumerName))
        .collect(toList());
  } catch (IOException e) {
    throw new IllegalArgumentException(e);
  }
  return pacts;
}
origin: org.arquillian.algeron/arquillian-algeron-pact-provider-core

protected List<Pact> getPacts(BeforeClass test) {
  final TestClass testClass = test.getTestClass();
  final Provider providerInfo = testClass.getAnnotation(Provider.class);
  if (providerInfo == null) {
    throw new IllegalArgumentException(
      String.format("Provider name should be set by using %s", Provider.class.getName()));
  }
  final String serviceName = providerInfo.value();
  final Consumer consumerInfo = testClass.getAnnotation(Consumer.class);
  final String consumerName = consumerInfo != null ? consumerInfo.value() : null;
  List<Pact> pacts = new ArrayList<>();
  try {
    final ContractsRetriever contractsSource =
      getContractsSource(testClass, algeronProviderConfigurationInstance.get());
    contractsSource.setProviderName(serviceName);
    final List<URI> contractsDirectory = contractsSource.retrieve();
    pacts = loadContractFiles(contractsDirectory, serviceName).stream()
      .filter(p -> consumerName == null || p.getConsumer().getName().equals(consumerName))
      .collect(toList());
  } catch (IOException e) {
    throw new IllegalArgumentException(e);
  }
  return pacts;
}
origin: au.com.dius/pact-jvm-provider-junit_2.11

  @Override
  public void evaluate() throws Throwable {
   setupTargetForInteraction(target);
   target.addResultCallback((result, verifier) -> results.put(interaction, new Pair<>(result, verifier)));
   surrogateTestMethod();
   target.testInteraction(pact.getConsumer().getName(), interaction, source);
  }
};
origin: au.com.dius/pact-jvm-consumer_2.11

  /**
   * Adds a provider state to this interaction
   * @param state Description of the state
   * @param params Data parameters for this state
   */
  public PactDslWithState given(String state, Map<String, Object> params) {
   addInteraction();
   return new PactDslWithState(consumerPactBuilder, request.consumer.getName(), request.provider.getName(),
    new ProviderState(state, params), defaultRequestValues, defaultResponseValues);
  }
}
origin: au.com.dius/pact-jvm-consumer_2.11

/**
 * Adds a provider state to this interaction
 * @param state Description of the state
 */
public PactDslWithState given(String state) {
  addInteraction();
  return new PactDslWithState(consumerPactBuilder, request.consumer.getName(), request.provider.getName(),
   new ProviderState(state), defaultRequestValues, defaultResponseValues);
}
origin: au.com.dius/pact-jvm-consumer

/**
 * Adds a provider state to this interaction
 * @param state Description of the state
 */
public PactDslWithState given(String state) {
  addInteraction();
  return new PactDslWithState(consumerPactBuilder, request.consumer.getName(), request.provider.getName(),
   new ProviderState(state), defaultRequestValues, defaultResponseValues);
}
origin: au.com.dius/pact-jvm-consumer

/**
 * Adds a provider state to this interaction
 * @param state Description of the state
 * @param params Data parameters for this state
 */
public PactDslWithState given(String state, Map<String, Object> params) {
 addInteraction();
 return new PactDslWithState(consumerPactBuilder, request.consumer.getName(), request.provider.getName(),
  new ProviderState(state, params), defaultRequestValues, defaultResponseValues);
}
au.com.dius.pact.modelConsumer

Most used methods

  • getName
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Top Sublime Text plugins
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