diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-14 18:41:17 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-14 18:41:17 +0100 |
| commit | 6194d284f5559acc5f23a402f577bac655878f92 (patch) | |
| tree | ad3a47c59e5d8179911cb2bd0b88ecd520af2842 /examples/05-list/output/java/src/test | |
| parent | 717cef4b3c757ceefb2a16cdf6c3892cde28b53f (diff) | |
Rename java-junit to java
Diffstat (limited to 'examples/05-list/output/java/src/test')
| -rw-r--r-- | examples/05-list/output/java/src/test/java/org/zwobble/example/PointTests.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/05-list/output/java/src/test/java/org/zwobble/example/PointTests.java b/examples/05-list/output/java/src/test/java/org/zwobble/example/PointTests.java new file mode 100644 index 0000000..e1528b5 --- /dev/null +++ b/examples/05-list/output/java/src/test/java/org/zwobble/example/PointTests.java @@ -0,0 +1,32 @@ +package org.zwobble.example; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import java.util.List; +import org.zwobble.example.types.point.Path; +import org.zwobble.example.types.point.Point; + +public class PointTests { + @Test + public void canCreatePathWithConstructor() { + Path path = new Path(List.of( + new Point(10, 25), + new Point(25, 10) + )); + + assertEquals(path.points().size(), 2); + } + + @Test + public void canCreatePathWithBuilder() { + Path path = Path.arbitrary() + .addPoint(new Point(10, 25)) + .addPoint(new Point(25, 10)) + .build(); + + assertEquals(path, new Path(List.of( + new Point(10, 25), + new Point(25, 10) + ))); + } +} |
