Package 

Class FixtureExtension

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterAllCallback , org.junit.jupiter.api.extension.BeforeAllCallback , org.junit.jupiter.api.extension.Extension , org.junit.jupiter.api.extension.ParameterResolver

    
    public final class FixtureExtension
     implements BeforeAllCallback, AfterAllCallback, ParameterResolver
                        

    Fixture Extension provides the ability to declare Test Fixtures in declarative way. Test fixtures are objects which are initialised and torn down as part of test life-cycle. Fixtures can act as dependency producers, these dependencies can then be injected either via constructor or method parameters into test instance

    fixture5.annotations.Fixture annotation is used to declare fixture types on top of test class

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit beforeAll(ExtensionContext context) Instantiates and sets up all declared fixtures of current test class
      Unit afterAll(ExtensionContext context)
      Boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
      Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FixtureExtension

        FixtureExtension()
    • Method Detail

      • beforeAll

         Unit beforeAll(ExtensionContext context)

        Instantiates and sets up all declared fixtures of current test class

      • resolveParameter

         Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)