Enum Class InfraTest.WebEnvironment

java.lang.Object
java.lang.Enum<InfraTest.WebEnvironment>
cn.taketoday.framework.test.context.InfraTest.WebEnvironment
所有已实现的接口:
Serializable, Comparable<InfraTest.WebEnvironment>, Constable
封闭类:
InfraTest

public static enum InfraTest.WebEnvironment extends Enum<InfraTest.WebEnvironment>
An enumeration web environment modes.
  • 嵌套类概要

    从类继承的嵌套类/接口 java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • 枚举常量概要

    枚举常量
    枚举常量
    说明
    Creates a (reactive) web application context without defining any server.port=0 Environment property.
    Creates a WebApplicationContext with a mock servlet environment if servlet APIs are on the classpath, a ReactiveWebApplicationContext if Infra WebFlux is on the classpath or a regular ApplicationContext otherwise.
    Creates an ApplicationContext and sets Application.setApplicationType(ApplicationType) to ApplicationType.NORMAL.
    Creates a web application context (reactive or servlet based) and sets a server.port=0 Environment property (which usually triggers listening on a random port).
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private final boolean
     
  • 构造器概要

    构造器
    限定符
    构造器
    说明
    private
    WebEnvironment(boolean embedded)
     
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    Return if the environment uses an ServletWebServerApplicationContext.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    从类继承的方法 java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 枚举常量详细资料

    • MOCK

      public static final InfraTest.WebEnvironment MOCK
      Creates a WebApplicationContext with a mock servlet environment if servlet APIs are on the classpath, a ReactiveWebApplicationContext if Infra WebFlux is on the classpath or a regular ApplicationContext otherwise.
    • RANDOM_PORT

      public static final InfraTest.WebEnvironment RANDOM_PORT
      Creates a web application context (reactive or servlet based) and sets a server.port=0 Environment property (which usually triggers listening on a random port). Often used in conjunction with a @LocalServerPort injected field on the test.
    • DEFINED_PORT

      public static final InfraTest.WebEnvironment DEFINED_PORT
      Creates a (reactive) web application context without defining any server.port=0 Environment property.
    • NONE

      public static final InfraTest.WebEnvironment NONE
      Creates an ApplicationContext and sets Application.setApplicationType(ApplicationType) to ApplicationType.NORMAL.
  • 字段详细资料

    • embedded

      private final boolean embedded
  • 构造器详细资料

    • WebEnvironment

      private WebEnvironment(boolean embedded)
  • 方法详细资料

    • values

      public static InfraTest.WebEnvironment[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static InfraTest.WebEnvironment valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值
    • isEmbedded

      public boolean isEmbedded()
      Return if the environment uses an ServletWebServerApplicationContext.
      返回:
      if an ServletWebServerApplicationContext is used.