riy / degraph

Test and Visualize and Manage Dependencies of classes and packages in JVM Byte Code (think Scala and Java)
http://riy.github.io/degraph/
Other
311 stars 36 forks source link

Is there any complex example of allowDirect #76

Closed opensource21 closed 7 years ago

opensource21 commented 7 years ago

I'm trying at https://github.com/opensource21/sze/tree/degraph to make a dependency test for one of my projects. There following slices which should have DirectAccess job, frontend -> service -> dao. Furthermore the are the slices config, security and model, constraints, util. config and security are not a problem. However I have model -> constraints -> util and model ->util which is OK for me. Furthermore job, frontend, service and dao could be reference model and util. I have no idea how to configure this with allowDirect. My main concern is that job/frontend call dao directly without using a service.

Any suggestions?

opensource21 commented 7 years ago

Solved with different test-methods. I checked with allow the principal direction. In another test I concentrate with include only on job, frontend -> service -> dao. Would be nice if someone can confirm this strategy.

schauder commented 7 years ago

Having separate tests is a valid approach.

You don't need the separate test with out slicing, since that is included in the other tests as well.

You can also use multiple allow/allowDirect for one slicing and you can define multiple slicings. But in your case a second test is probably the best approach.