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

com.github.dakusui.jcunit8.pipeline.Requirement Maven / Gradle / Ivy

package com.github.dakusui.jcunit8.pipeline;

public interface Requirement {
  int strength();

  boolean generateNegativeTests();

  class Builder {
    private int strength = 2;
    private boolean negativeTestGeneration;

    public Builder withStrength(int strength) {
      this.strength = strength;
      return this;
    }

    public Builder withNegativeTestGeneration(boolean enable) {
      this.negativeTestGeneration = enable;
      return this;
    }

    public Requirement build() {
      return new Requirement() {
        @Override
        public int strength() {
          return strength;
        }

        @Override
        public boolean generateNegativeTests() {
          return negativeTestGeneration;
        }
      };
    }
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy