From 8559d4d7d2678b1edaf34e7b3439e5117c6938b0 Mon Sep 17 00:00:00 2001 From: Christian Femers Date: Fri, 19 Mar 2021 17:15:29 +0100 Subject: [PATCH] Order the test methods by name like they are ordered in the test class --- src/test/java/de/tum/in/test/testutilities/UserBased.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/java/de/tum/in/test/testutilities/UserBased.java b/src/test/java/de/tum/in/test/testutilities/UserBased.java index f7f8debf..100348b5 100644 --- a/src/test/java/de/tum/in/test/testutilities/UserBased.java +++ b/src/test/java/de/tum/in/test/testutilities/UserBased.java @@ -9,6 +9,8 @@ import org.apiguardian.api.API; import org.apiguardian.api.API.Status; +import org.junit.jupiter.api.MethodOrderer.MethodName; +import org.junit.jupiter.api.TestMethodOrder; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.engine.descriptor.JupiterEngineDescriptor; @@ -17,11 +19,12 @@ * user of the test API, so the user is a different test class that is not * called "Test" because it is not the main test itself, but executed using the * JUnit platform. - * + * * @author Christian Femers */ @API(status = Status.INTERNAL) @ExtendWith(TestUserExtension.class) +@TestMethodOrder(MethodName.class) @Documented @Retention(RUNTIME) @Target({ TYPE, ANNOTATION_TYPE })