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

org.assertj.vavr.api.SeqShouldHaveAtIndex Maven / Gradle / Ivy

package org.assertj.vavr.api;

import org.assertj.core.api.Condition;
import org.assertj.core.data.Index;
import org.assertj.core.error.BasicErrorMessageFactory;
import org.assertj.core.error.ErrorMessageFactory;

import io.vavr.collection.Seq;

/**
 * Builds error message when a given condition is not met at specified index in actual {@link io.vavr.collection.Seq}
 *
 * @author Michał Chmielarz
 */
class SeqShouldHaveAtIndex extends BasicErrorMessageFactory {

  private  SeqShouldHaveAtIndex(Seq actual, Condition condition, Index index, T found) {
    super("%nExpecting:%n <%s>%nat index <%s> to have:%n <%s>%nin:%n <%s>%n", found, index.value, condition, actual);
  }

  static  ErrorMessageFactory shouldHaveAtIndex(Seq actual, Condition condition, Index index, T found) {
    return new SeqShouldHaveAtIndex(actual, condition, index, found);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy