Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package services
  2.  
  3. import services.ExistingService
  4. import org.scalatest.FunSuite
  5. import org.wartremover.test.WartTestTraverser
  6. import test.ResultAssertions
  7. import warts.LayerControl
  8.  
  9. class LayerControlTest extends FunSuite with ResultAssertions{
  10.  
  11. test("Calling services from services is not allowed") {
  12. val result = WartTestTraverser(LayerControl) {
  13. val test = ExistingService
  14. }
  15. assertError(result)("Calling services from services is not allowed.")
  16. }
  17.  
  18. test("Calling other layers from services is allowed") {
  19. val result = WartTestTraverser(LayerControl) {
  20. val testModel = someModel
  21. val testController = someController
  22. val testRepo = someRepository
  23. }
  24. assertEmpty(result)
  25. }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement