Skip to content

Instantly share code, notes, and snippets.

@irof
Created March 4, 2013 12:48
Show Gist options
  • Save irof/5082040 to your computer and use it in GitHub Desktop.
Save irof/5082040 to your computer and use it in GitHub Desktop.
http://backpaper0.github.com/2013/03/03/like_bdd_by_java8.html をデフォルトのふぉーまったにかけてみた
package app;
public class CalcSpec extends Specs {
{
it("1 足す 2 は 3", () -> {
expect(() -> 1 + 2).toEqual(3);
});
it("1 割る 0 は例外", () -> {
expect(() -> 1 / 0).toThrow(ArithmeticException.class);
});
}
}
package app;
public class CalcSpec extends Specs {{
it("1 足す 2 は 3", () -> {
expect(() -> 1 + 2).toEqual(3);
});
it("1 割る 0 は例外", () -> {
expect(() -> 1 / 0).toThrow(ArithmeticException.class);
});
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment