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

hope.kola.contract.assertj.bridge.PeriodAssert 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;

/** {@link org.assertj.core.api.AbstractPeriodAssert} */
public class PeriodAssert extends AssertThat {
  @Override
  public PrimitiveType primitiveType() {
    return PrimitiveType.PERIOD;
  }

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

  /** {@link org.assertj.core.api.AbstractPeriodAssert#hasYears} */
  public PeriodAssert hasYears(Integer expectedYears) {
    segment("hasYears").argument(DynamicProperty.newInteger(expectedYears));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractPeriodAssert#hasMonths} */
  public PeriodAssert hasMonths(Integer expectedMonths) {
    segment("hasMonths").argument(DynamicProperty.newInteger(expectedMonths));
    return this;
  }

  /** {@link org.assertj.core.api.AbstractPeriodAssert#hasDays} */
  public PeriodAssert hasDays(Integer expectedDays) {
    segment("hasDays").argument(DynamicProperty.newInteger(expectedDays));
    return this;
  }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy