Skip to content

Instantly share code, notes, and snippets.

@wsoczynski
Created March 21, 2012 12:29
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/2146605 to your computer and use it in GitHub Desktop.
Save wsoczynski/2146605 to your computer and use it in GitHub Desktop.
Wiedz, że coś się dzieje 5
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