Skip to content

packages assertions #1481

@xenoterracide

Description

@xenoterracide

I'd like to be able to look for annotations on package-info and honestly module-info but that's less important since I have less of those and they are created less often.

packages().should().beAnnotatedWithOneOf(Nullmarked.class, NullUnmarked.class).check(javaClasses);
packages().matching(".*").should().beAnnotatedWithOneOf(InfrastructureLayer.class, DomainLayer.class).check(javaClasses);
packages().matching("..").should().notHaveNestedPackagesDeeperThan(2).check(javaClasses);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions