Created
March 21, 2012 12:29
-
-
Save wsoczynski/2146605 to your computer and use it in GitHub Desktop.
Wiedz, że coś się dzieje 5
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 TestSubject3 { | |
val prop1 = 1; | |
val prop2 = 2; | |
def doFoo():Boolean = { | |
val someText = doFoo1(); | |
val textToSend = doFoo2(someText); | |
return callSomeWebService(textToSend); | |
} | |
protected def doFoo1(): String = { | |
return "some complicated logic" + prop1 | |
} | |
protected def doFoo2(input: String): String = { | |
return input + " more very complicated logic " + prop2 | |
} | |
protected def callSomeWebService(textToSend: String): Boolean = { | |
return true; | |
} | |
} | |
def testCase3(){ | |
val testSubject = new TestCase3 | |
if(testSubject.doFoo1() == "some complicated logic1"){ | |
if(testSubject.doFoo2("some complicated logic1") == "some complicated logic1 more very complicated logic 2"){ | |
if(testSubject.callSomeWebService("aaa") == true){ | |
println("true") | |
return | |
} | |
} | |
} | |
println("false") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment