Skip to content

Commit

Permalink
tests for MkMono and MkWpa are private
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Feb 12, 2025
1 parent 613a0d0 commit be8d81f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/java/org/eolang/lints/PkMonoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@
*/
package org.eolang.lints;

import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.core.importer.ImportOption;
import com.tngtech.archunit.lang.syntax.ArchRuleDefinition;
import com.yegor256.Together;
import org.cactoos.scalar.LengthOf;
import org.cactoos.set.SetOf;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;

/**
* Tests for {@link PkMono}.
Expand All @@ -50,4 +54,15 @@ void createsLintsInParallel() {
);
}

@Test
void staysInsideThePackage() {
ArchRuleDefinition.classes()
.that().haveSimpleName("PkMono")
.should().bePackagePrivate()
.check(new ClassFileImporter()
.withImportOption(new ImportOption.DoNotIncludeTests())
.importPackages("org.eolang.lints")
);
}

}
14 changes: 14 additions & 0 deletions src/test/java/org/eolang/lints/PkWpaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@
*/
package org.eolang.lints;

import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.core.importer.ImportOption;
import com.tngtech.archunit.lang.syntax.ArchRuleDefinition;
import com.yegor256.Together;
import org.cactoos.scalar.LengthOf;
import org.cactoos.set.SetOf;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;

/**
* Tests for {@link PkWpa}.
Expand All @@ -50,4 +54,14 @@ void createsLintsInParallel() {
);
}

@Test
void staysInsideThePackage() {
ArchRuleDefinition.classes()
.that().haveSimpleName("PkWpa")
.should().bePackagePrivate()
.check(new ClassFileImporter()
.withImportOption(new ImportOption.DoNotIncludeTests())
.importPackages("org.eolang.lints")
);
}
}

0 comments on commit be8d81f

Please sign in to comment.