This file contains hidden or 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
public abstract class A<T> { | |
public T b; | |
public A(T b) { | |
this.b = b; | |
} | |
} |
This file contains hidden or 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
def Given(name: String, body: Either[String => String, (Int, String) => String]) = { | |
body match { | |
case Left(b) => b("bob") | |
case Right(b) => b(5, "belly") | |
} | |
} | |
Given("I have (\\d+) cukes in my (.*)", Right("You have " + _ + " cukes in your " + _)) | |
Given("my name is (.*)", Left("Your name is " + _)) |