Created
March 21, 2012 11:00
-
-
Save wsoczynski/2146191 to your computer and use it in GitHub Desktop.
Wiedz, że coś się dzieje 3
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 Bar(var i: Int) { | |
} | |
class Baz(bar: Bar) { | |
var barProperty = bar | |
} | |
class TestSubject2 { | |
def doFoo(baz: Baz):Int ={ | |
val someUsefulValue = baz.barProperty.i | |
return doRealyFoo(someUsefulValue) | |
} | |
private def doRealyFoo(input: Int):Int = { | |
return input + 10 | |
} | |
} | |
def testCase2() { | |
val bar = new Bar(10) | |
val baz = new Baz(bar) | |
val testedObject = new TestCase2 | |
val result = testedObject.doFoo(baz) | |
if(result == 20){ | |
println("true") | |
} else { | |
println("false") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment