Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save schauder/41c27adaeac3975ed89d to your computer and use it in GitHub Desktop.
Save schauder/41c27adaeac3975ed89d to your computer and use it in GitHub Desktop.
import de.schauderhaft.degraph.configuration.NamedPattern;
import static de.schauderhaft.degraph.check.JCheck.*;
import org.junit.Test;
import static org.hamcrest.core.Is.*;
import static org.junit.Assert.assertThat;
import static de.schauderhaft.degraph.check.Check.classpath;
public class NoDependenciesBetweenDaosTest {
@Test
public void it() {
assertThat(
classpath()
.including("de.mycompany.myproject.**.*.**Dao")
.withSlicing("dao", "de.mycompany.myproject.**.(*).**Dao")
.allowDirect(JLayer.anyOf("fahrzeug","auftrag", "marvel")),
is(violationFree())
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment