All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.server.springboot.cucumber.rest.SyncElementAsserter.mustache Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package {{packageName}}.cucumber.rest;

import java.util.Collection;
import java.util.List;
import java.util.Map;

class SyncElementAsserter implements ElementAsserter {

  private final SyncResponseAsserter responseAsserter;
  private final ElementAssertions assertions;

  SyncElementAsserter(SyncResponseAsserter responseAsserter, String jsonPath) {
    this.responseAsserter = responseAsserter;
    assertions = new ElementAssertions(jsonPath);
  }

  @Override
  public SyncElementAsserter withValue(Object value) {
    assertions.withValue(value);

    return this;
  }

  @Override
  public  SyncElementAsserter containingExactly(List> responses) {
    assertions.containingExactly(responses);

    return this;
  }

  @Override
  public  SyncElementAsserter containing(Map response) {
    assertions.containing(response);

    return this;
  }

  @Override
  public SyncElementAsserter withElementsCount(int count) {
    assertions.withElementsCount(count);

    return this;
  }

  @Override
  public SyncElementAsserter withMoreThanElementsCount(int count) {
    assertions.withMoreThanElementsCount(count);

    return this;
  }

  @Override
  public  SyncElementAsserter containing(List> responses) {
    assertions.containing(responses);

    return this;
  }

  @Override
  public SyncElementAsserter withValues(Collection values) {
    assertions.withValues(values);

    return this;
  }

  public SyncResponseAsserter and() {
    return responseAsserter;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy