From c6a36e1b4a999a84b681eb0c53cadb2057e37f08 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 14 Jul 2026 18:16:29 +0100 Subject: Convert example 01-struct to use java-junit --- examples/01-struct/output/java-junit/.gitignore | 2 ++ examples/01-struct/output/java-junit/pom.xml | 1 + .../src/test/java/org/zwobble/example/PointTests.java | 16 ++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 examples/01-struct/output/java-junit/.gitignore create mode 120000 examples/01-struct/output/java-junit/pom.xml create mode 100644 examples/01-struct/output/java-junit/src/test/java/org/zwobble/example/PointTests.java (limited to 'examples/01-struct/output/java-junit') diff --git a/examples/01-struct/output/java-junit/.gitignore b/examples/01-struct/output/java-junit/.gitignore new file mode 100644 index 0000000..ff511d4 --- /dev/null +++ b/examples/01-struct/output/java-junit/.gitignore @@ -0,0 +1,2 @@ +/src/gen/ +/target/ diff --git a/examples/01-struct/output/java-junit/pom.xml b/examples/01-struct/output/java-junit/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/01-struct/output/java-junit/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/01-struct/output/java-junit/src/test/java/org/zwobble/example/PointTests.java b/examples/01-struct/output/java-junit/src/test/java/org/zwobble/example/PointTests.java new file mode 100644 index 0000000..18a1961 --- /dev/null +++ b/examples/01-struct/output/java-junit/src/test/java/org/zwobble/example/PointTests.java @@ -0,0 +1,16 @@ +package org.zwobble.example; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.zwobble.example.types.point.Point; + +public class PointTests { + @Test + public void pointFields() { + Point point = new Point(10, 25); + int x = point.x(); + int y = point.y(); + assertEquals(x, 10); + assertEquals(y, 25); + } +} -- cgit v1.2.3