Skip to content

Support .dependOnClassesThat() for Methods #1060

@u3r

Description

@u3r

I'd like to write a test for
<no non-private Methods should "depend" on a specific (dangerous) class>

After writing lots of DescribedPredicates I noticed that noClasses().should().dependOnClassesThat(). ... already does NEARLY what I need but is too all-encompassing.

Internally everything is there Dependency.tryCreateFromReturnType and friends are all there - just not public api.

Therefore I'd like to propose exposing something like

   noMethods().should().dependOnArgumentsThat(). ... // just the arguments
              .orShould().dependOnReturnTypesThat()...  // just the return type
              .orShould().accessClassesThat() // just access within the method
              .orShould().dependOnClassesThat() // arguments + return type + access within the method

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions