code-assert
code-assert copied to clipboard
Failure when having rules on a package that only contains packages
I have a package named 'connectors' that contains several packages but not direct classes. I want to have a rule like:
DependencyRule common, connector;
@Override
public void defineRules() {
common.mustNotUse(connector.allSubOf());
connector.andAllSub().mayUse(common);
}
But this test failed:
java.lang.AssertionError:
Expected: Comply with rules
but:
NOT_EXISTING com.xxx.connector There is a rule for this element, but it has not been found in the code.
But the package exists. If I add a class directly in the package, the error disappears.
Do I miss something ?