Created
March 21, 2012 12:55
-
-
Save wsoczynski/2146704 to your computer and use it in GitHub Desktop.
Wiedz, że coś się dzieje 6
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 TestSubject3refactored(doFoo1: DoFoo1, doFoo2: DoFoo2) { | |
val prop1 = 1; | |
val prop2 = 2; | |
def doFoo():Boolean = { | |
val someText = doFoo1.doFoo1(prop1) | |
val textToSend = doFoo2.doFoo2(someText, prop2) | |
return callSomeWebService(textToSend) | |
} | |
private def callSomeWebService(textToSend: String): Boolean = { | |
return true; | |
} | |
} | |
def testCase3refactored(){ | |
val doFoo1 = new DoFoo1; | |
val doFoo2 = new DoFoo2; | |
val testSubject = new TestSubject3refactored(doFoo1,doFoo2) | |
if(testSubject.doFoo()){ | |
println("true") | |
} else { | |
println("false") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment