Created
February 11, 2018 11:30
-
-
Save pinguinson/e6461b70105096eb8ef44562cc27ad5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Example(serviceA: ServiceA, serviceB: ServiceB, serviceC: ServiceC) { | |
def sum(x: Int, y: Int): Int = { | |
serviceA.foo(x) | |
serviceB.bar(y) | |
// Doesn't call serviceC, so any test expecting it should fail | |
x + y | |
} | |
} | |
trait ServiceA { | |
def foo(x: Int): Unit | |
} | |
trait ServiceB { | |
def bar(y: Int): Unit | |
} | |
trait ServiceC { | |
def baz(z: Int): String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment