Skip to content

Instantly share code, notes, and snippets.

@wsoczynski
Created March 21, 2012 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wsoczynski/2146704 to your computer and use it in GitHub Desktop.
Save wsoczynski/2146704 to your computer and use it in GitHub Desktop.
Wiedz, że coś się dzieje 6
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