Skip to content

Instantly share code, notes, and snippets.

@rickyclarkson
rickyclarkson / A.java
Last active December 17, 2015 10:59 — forked from ohcibi/A.java
public abstract class A<T> {
public T b;
public A(T b) {
this.b = b;
}
}
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 " + _))