Skip to content

Commit

Permalink
Added test for bld example
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Aug 19, 2023
1 parent d6f25e6 commit 4440fe0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 1 addition & 2 deletions examples/java/bld/src/bld/java/com/example/ExampleBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public ExampleBuild() {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);

scope(compile)
.include(dependency("net.thauvin.erik", "semver",
version(1, 2, 1, "SNAPSHOT")));
.include(dependency("net.thauvin.erik", "semver", version(1, 2, 1, "SNAPSHOT")));
}

@BuildCommand(summary = "Run the example")
Expand Down
16 changes: 15 additions & 1 deletion examples/java/bld/src/test/java/com/example/ExampleTest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package com.example;

public class ExampleTest {
}
private static final String HELLO = "Hello!";

public static void main(String[] args) {
var hello = new ExampleTest().verifyHello();
if (HELLO.equals(hello)) {
System.out.println("Succeeded");
} else {
throw new AssertionError();
}
}

String verifyHello() {
return HELLO;
}
}

0 comments on commit 4440fe0

Please sign in to comment.