Class InjectExtension

java.lang.Object
io.avaje.inject.test.InjectExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension

public class InjectExtension
extends Object
implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
Junit 5 extension for avaje inject.

Supports injection for fields annotated with @Mock, @Spy, @Captor, @Inject.

  • Constructor Summary

    Constructors
    Constructor Description
    InjectExtension()  
  • Method Summary

    Modifier and Type Method Description
    void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)
    Callback that is invoked after each test has been invoked.
    void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)
    Callback that is invoked before each test is invoked.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • beforeEach

      public void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)
      Callback that is invoked before each test is invoked.
      Specified by:
      beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
    • afterEach

      public void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)
      Callback that is invoked after each test has been invoked.
      Specified by:
      afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback