Created
March 4, 2013 12:48
-
-
Save irof/5082040 to your computer and use it in GitHub Desktop.
http://backpaper0.github.com/2013/03/03/like_bdd_by_java8.html をデフォルトのふぉーまったにかけてみた
This file contains 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
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); | |
}); | |
} | |
} |
This file contains 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
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