import static org.specsy.Specsy.*; import static org.specsy.runner.Executor.*; public class MathTest { public static void main(String[] args) { run(MathTest::spec); } private static void spec() { describe("Math operations", () -> { int a, b; beforeEach(() -> { a = 2; b = 3; }); it("should add two numbers", () -> { int sum = a + b; expect(sum).toBe(5); }); it("should subtract two numbers", () -> { int difference = a - b; expect(difference).toBe(-1); }); }); } }


上一篇:
下一篇:
切换中文