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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    beforeAll(org.junit.jupiter.api.extension.ExtensionContext context)
    Starts MagicDraw application before all tests.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface org.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 interface org.junit.jupiter.api.extension.AfterAllCallback