package io.delphi.qa.auto.awsmfrw.managers.helpers.api.rest;

import com.google.common.collect.Ordering;
import io.delphi.qa.auto.awsmfrw.managers.helpers.common.IsaAssertions;

import java.util.stream.Collectors;
import java.util.stream.Stream;

public class HlJavaV3Asserts implements IsaAssertions {

  public <T> void shouldOrderedNatural(String matcherLabel, Stream<T> stream) {
    if (stream.findAny().isPresent()) {
      isaAssertTrue(
          Ordering.natural()
              .reverse()
              .isOrdered((Iterable<? extends Comparable>) stream.collect(Collectors.toList())), matcherLabel
      );
    }
  }
}
