org.springframework.boot.test.mock.mockito

Annotation Type MockBeans



  • @Retention(value=RUNTIME)
     @Target(value=TYPE)
     @Documented
    public @interface MockBeans
    Container annotation that aggregates several MockBean annotations.

    Can be used natively, declaring several nested MockBean annotations. Can also be used in conjunction with Java 8's support for repeatable annotations, where MockBean can simply be declared several times on the same type, implicitly generating this container annotation.

    Since:
    1.4.0
    Author:
    Phillip Webb
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element and Description
      MockBean[] value
      Return the contained MockBean annotations.
    • Element Detail

      • value

        public abstract MockBean[] value
        Return the contained MockBean annotations.
        Returns:
        the mock beans