Package com.nomagic.magicdraw.tests
Class MagicDrawApplication
java.lang.Object
com.nomagic.magicdraw.tests.MagicDrawApplication
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback
,org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.Extension
@OpenApiAll
public class MagicDrawApplication
extends Object
implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
Extend with this extension to run JUnit5 test group with MagicDraw application started. Usage example:
@ExtendWith(MagicDrawApplication.class)
class TestWithMagicDraw {
@Test
void test() {
//your test code here
}
}
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterAll
(org.junit.jupiter.api.extension.ExtensionContext context) After all tests MagicDraw application will not be stopped as it might be needed for further test classes.void
beforeAll
(org.junit.jupiter.api.extension.ExtensionContext context) Starts MagicDraw application before all tests.
-
Constructor Details
-
MagicDrawApplication
public MagicDrawApplication()
-
-
Method Details
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) Starts MagicDraw application before all tests.- Specified by:
beforeAll
in interfaceorg.junit.jupiter.api.extension.BeforeAllCallback
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) After all tests MagicDraw application will not be stopped as it might be needed for further test classes. This method only prints info about the current memory usage of the application.- Specified by:
afterAll
in interfaceorg.junit.jupiter.api.extension.AfterAllCallback
-