Annotation Type DataObjectDefinitionDeployment


  • @Target({TYPE,METHOD})
    @Retention(RUNTIME)
    @Documented
    @Inherited
    @Repeatable(DataObjectDefinitionDeployments.class)
    public @interface DataObjectDefinitionDeployment
    Annotation that can be used to trigger a deployment of data object definitions for the provided test. If no resources() are provided, then an data object definition containing the name of the test class and method would be used to deploy. There are 2 use cases for this annotation:
    • Class level - The data object definitions will be deployed before every test, and they will be removed after every tests. In case TestInstance.Lifecycle#PER_CLASS is used, then the definitions will be deployed before all tests and removed after all tests.
    • Method level - The data object definitions will be deployed before the test and will be removed after the test
    e.g.
    
     @DataObjectDefinitionDeployment
     class YourTest {
    
       @BeforeEach
       void setUp(DataObjectEngine dataObjectEngine) {
           ...
       }
    
       @Test
       @DataObjectDefinitionDeployment
       void myTest() {
           ...
       }
    
       ...
     }
     
    Author:
    Filip Hrisafov
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String[] resources  
      java.lang.String tenantId  
    • Element Detail

      • resources

        java.lang.String[] resources
        Default:
        {}
      • tenantId

        java.lang.String tenantId
        Default:
        ""