Class TestFixture.Builder<T>

java.lang.Object
cloud.opencode.base.test.fixture.TestFixture.Builder<T>
Type Parameters:
T - the data type | 数据类型
Enclosing class:
TestFixture<T>

public static class TestFixture.Builder<T> extends Object
Builder for TestFixture TestFixture的构建器
Since:
JDK 25, opencode-base-test V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Method Details

    • setup

      public TestFixture.Builder<T> setup(Supplier<T> setup)
      Set the setup function 设置setup函数
      Parameters:
      setup - the setup function | 设置函数
      Returns:
      this builder | 此构建器
    • teardown

      public TestFixture.Builder<T> teardown(Consumer<T> teardown)
      Set the teardown function 设置teardown函数
      Parameters:
      teardown - the teardown function | 拆除函数
      Returns:
      this builder | 此构建器
    • build

      public TestFixture<T> build()
      Build the fixture 构建夹具
      Returns:
      the fixture | 夹具