Skip to content

Disable the tests that are used as SUT in an architecture test #1370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/test/java/edu/hm/hafner/util/ArchitectureRulesTest.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package edu.hm.hafner.util;

import java.io.Serializable;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.tngtech.archunit.core.domain.JavaClasses;
import com.tngtech.archunit.core.importer.ClassFileImporter;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.Serializable;

import static org.assertj.core.api.Assertions.*;

/**
Expand Down Expand Up @@ -115,7 +116,7 @@ public static class ArchitectureRulesViolatedTest {
@edu.umd.cs.findbugs.annotations.Nullable
private final String noNullable = null;

@Test
@Test @Disabled("This test is just there to be used in architecture tests")
public void shouldFail() {
org.junit.jupiter.api.Assertions.assertEquals(1, 1);

Expand Down Expand Up @@ -154,7 +155,7 @@ private Object readResolve() {
@SuppressWarnings("all") @Generated // This class is just there to be used in architecture tests
@SuppressFBWarnings("SE")
static final class ArchitectureRulesPassedTest implements Serializable {
@Test
@Test @Disabled("This test is just there to be used in architecture tests")
void shouldPass() {
throw new IllegalArgumentException("context");
}
Expand Down
Loading