Package org.silverpeas.core.test.extention
Provides various JUnit 5 extensions to prepare and configure the context of execution of unit
tests.
- Author:
- mmoquillon
-
Class Summary Class Description FieldMocker Provides mocking facilities on the fields of beans used in unit tests.GreenMailExtension A replacement ofGreenMailRule
to use GreenMail in JUnit 5 based unit tests.LocalizationBundleStub Provides easy stubbing on theLocalizationBundle
in unit tests.LoggerExtension JUnit 5 extension to take care of the logger levels to set in a given unit test.SettingBundleStub Provides easy stubbing on theSettingBundle
in unit tests.SilverTestEnv Prepares the environment specific to Silverpeas to run unit tests. -
Annotation Types Summary Annotation Type Description EnableSilverTestEnv Enables the Silverpeas environment dedicated to the unit tests.LoggerLevel Annotation to specify a logger level.RequesterProvider Annotation to indicate that the annotated method is a provider of a user that has to be used as the current requester in each unit tests of the test class of the provider.SmtpConfig Annotation used by theGreenMailExtension
to locate the properties file in which are parameterized the SMTP configuration for a mail server to use in unit tests.TestedBean Annotation to indicate that a field in a unit test class is a bean being tested.TestManagedBean This annotation is used to indicate that a field or a parameter has to be instantiated and then registered into the bean container used in the test before executing that test.TestManagedBeans Annotation used to declare a set of classes to instantiate and to register into theBeanContainer
used in the unit tests.TestManagedMock This annotation is used to indicate that a field or a parameter has to be mocked and then registered into the bean container used in the test before executing that test.TestManagedMocks Annotation used to declare a set of classes to mock and to register into theBeanContainer
used in the unit tests.