diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/jupiter/BugTest.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/jupiter/BugTest.java new file mode 100644 index 000000000..60993d70f --- /dev/null +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/jupiter/BugTest.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2026 Avaloq Group AG and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Avaloq Group AG - initial API and implementation + *******************************************************************************/ +package com.avaloq.tools.ddk.test.core.jupiter; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.junit.jupiter.api.Test; + +/** + * An annotation used to indicate which bug issues a test method or test class covers. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.TYPE}) +@Test +public @interface BugTest { + /** + * The list of bug issues. + * + * @return the list of bug issues + */ + String[] value(); + + /** + * Returns whether the corresponding bug is already fixed. Bug tests for unresolved bugs are disabled for common test runs. + * + * @return true for unresolved bugs; false for fixed bugs. + */ + boolean unresolved() default false; + +} diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/jupiter/BugTestAwareRule.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/jupiter/BugTestAwareRule.java index eaafe5d0f..05da7cd23 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/jupiter/BugTestAwareRule.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/jupiter/BugTestAwareRule.java @@ -16,7 +16,7 @@ import org.junit.jupiter.api.extension.InvocationInterceptor; import org.junit.jupiter.api.extension.ReflectiveInvocationContext; -import com.avaloq.tools.ddk.test.core.BugTest; +import com.avaloq.tools.ddk.test.core.jupiter.BugTest; /** @@ -98,3 +98,4 @@ public void interceptTestMethod(final Invocation invocation, final Reflect } } +