Annotation Type ServiceDefinitionDeployment


  • @Target({TYPE,METHOD})
    @Retention(RUNTIME)
    @Documented
    @Inherited
    @Repeatable(ServiceDefinitionDeployments.class)
    public @interface ServiceDefinitionDeployment
    Annotation that can be used to trigger a deployment of service definitions for the provided test. If no resources() are provided, then an service 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 service definitions will be deployed before all tests, and they will be removed after all tests
    • Method level - The service definitions will be deployed before the test and will be removed after the test
    e.g.
    
     @ServiceDefinitionDeployment
     class YourTest {
    
       @BeforeEach
       void setUp(ServiceEngine serviceRegistryEngine) {
           ...
       }
    
       @Test
       @ServiceDefinitionDeployment
       void myTest(ServiceService serviceService) {
           ...
       }
    
       ...
     }
     
    Author:
    Filip Hrisafov
    • Element Detail

      • resources

        String[] resources
        Default:
        {}
      • tenantId

        String tenantId
        Default:
        ""