Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package services
- import services.ExistingService
- import org.scalatest.FunSuite
- import org.wartremover.test.WartTestTraverser
- import test.ResultAssertions
- import warts.LayerControl
- class LayerControlTest extends FunSuite with ResultAssertions{
- test("Calling services from services is not allowed") {
- val result = WartTestTraverser(LayerControl) {
- val test = ExistingService
- }
- assertError(result)("Calling services from services is not allowed.")
- }
- test("Calling other layers from services is allowed") {
- val result = WartTestTraverser(LayerControl) {
- val testModel = someModel
- val testController = someController
- val testRepo = someRepository
- }
- assertEmpty(result)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement