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

com.github.dakusui.jcunit8.testsuite.TestCase Maven / Gradle / Ivy

There is a newer version: 0.8.17
Show newest version
package com.github.dakusui.jcunit8.testsuite;

import com.github.dakusui.jcunit.core.tuples.Tuple;
import com.github.dakusui.jcunit8.factorspace.Constraint;

import java.util.List;

public interface TestCase {
  enum Category {
    SEED,
    REGULAR,
    NEGATIVE;

    TestCase createTestCase(Tuple test, List violatedConstraints) {
      return new TestCase() {
        @Override
        public Tuple get() {
          return test;
        }

        @Override
        public Category getCategory() {
          return Category.this;
        }

        @Override
        public List violatedConstraints() {
          return violatedConstraints;
        }

        @Override
        public String toString() {
          return String.format("%s:%s:%s", this.getCategory(), this.get(), violatedConstraints);
        }
      };
    }

  }

  Tuple get();

  Category getCategory();

  List violatedConstraints();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy