Enum TestInstantiationAwareExtension.ExtensionContextScope

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DEFAULT
      Deprecated.
      This behavior will be removed from future versions of JUnit, and TEST_METHOD will become the default.
      TEST_METHOD
      The extension should receive an ExtensionContext scoped to the test method.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_SCOPE_PROPERTY_NAME
      Property name used to set the default extension context scope: "junit.jupiter.extensions.testinstantiation.extensioncontextscope.default"
    • Field Detail

      • DEFAULT_SCOPE_PROPERTY_NAME

        public static final java.lang.String DEFAULT_SCOPE_PROPERTY_NAME
        Property name used to set the default extension context scope: "junit.jupiter.extensions.testinstantiation.extensioncontextscope.default"

        Supported Values

        Supported values include names of enum constants defined in this class, ignoring case.

        See Also:
        DEFAULT, Constant Field Values
    • Method Detail

      • values

        public static TestInstantiationAwareExtension.ExtensionContextScope[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TestInstantiationAwareExtension.ExtensionContextScope c : TestInstantiationAwareExtension.ExtensionContextScope.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TestInstantiationAwareExtension.ExtensionContextScope valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null