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

hope.kola.contract.assertj.bridge.LongAssert Maven / Gradle / Ivy

There is a newer version: 1.1.2-RELEASE
Show newest version
package hope.kola.contract.assertj.bridge;

import com.squareup.javapoet.ClassName;
import hope.kola.contract.assertj.model.DynamicProperty;
import hope.kola.contract.assertj.model.PrimitiveType;
import org.assertj.core.data.Offset;

/** {@link org.assertj.core.api.AbstractLongAssert} */
public class LongAssert extends AssertThat {
  @Override
  public PrimitiveType primitiveType() {
    return PrimitiveType.LONG;
  }

  @Override
  public ClassName assertJClass() {
    return ClassName.get("org.assertj.core.api", "AbstractLongAssert");
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isEqualTo} */
  public LongAssert isEqualTo(Long expected) {
    segment("isEqualTo").argument(DynamicProperty.newLong(expected));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isNotEqualTo} */
  public LongAssert isNotEqualTo(Long other) {
    segment("isNotEqualTo").argument(DynamicProperty.newLong(other));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isZero} */
  public LongAssert isZero() {
    segment("isZero");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isNotZero} */
  public LongAssert isNotZero() {
    segment("isNotZero");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isOne} */
  public LongAssert isOne() {
    segment("isOne");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isPositive} */
  public LongAssert isPositive() {
    segment("isPositive");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isNegative} */
  public LongAssert isNegative() {
    segment("isNegative");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isNotNegative} */
  public LongAssert isNotNegative() {
    segment("isNotNegative");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isNotPositive} */
  public LongAssert isNotPositive() {
    segment("isNotPositive");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isEven} */
  public LongAssert isEven() {
    segment("isEven");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isOdd} */
  public LongAssert isOdd() {
    segment("isOdd");
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isLessThan} */
  public LongAssert isLessThan(Long other) {
    segment("isLessThan").argument(DynamicProperty.newLong(other));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isLessThanOrEqualTo} */
  public LongAssert isLessThanOrEqualTo(Long other) {
    segment("isLessThanOrEqualTo").argument(DynamicProperty.newLong(other));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isGreaterThan} */
  public LongAssert isGreaterThan(Long other) {
    segment("isGreaterThan").argument(DynamicProperty.newLong(other));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isGreaterThanOrEqualTo} */
  public LongAssert isGreaterThanOrEqualTo(Long other) {
    segment("isGreaterThanOrEqualTo").argument(DynamicProperty.newLong(other));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isBetween} */
  public LongAssert isBetween(Long start, Long end) {
    segment("isBetween")
        .argument(DynamicProperty.newLong(start))
        .argument(DynamicProperty.newLong(end));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isStrictlyBetween} */
  public LongAssert isStrictlyBetween(Long start, Long end) {
    segment("isStrictlyBetween")
        .argument(DynamicProperty.newLong(start))
        .argument(DynamicProperty.newLong(end));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isCloseTo} */
  public LongAssert isCloseTo(Long expected, Offset offset) {
    segment("isCloseTo")
        .argument(DynamicProperty.newLong(expected))
        .argument(DynamicProperty.newOffset(offset));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractLongAssert#isNotCloseTo} */
  public LongAssert isNotCloseTo(Long expected, Offset offset) {
    segment("isNotCloseTo")
        .argument(DynamicProperty.newLong(expected))
        .argument(DynamicProperty.newOffset(offset));
    return this;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy