Added test for bld example

This commit is contained in:
Erik C. Thauvin 2023-08-19 11:04:13 -07:00
parent d6f25e6b48
commit 4440fe0373
2 changed files with 16 additions and 3 deletions

View file

@ -21,8 +21,7 @@ public class ExampleBuild extends Project {
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")

View file

@ -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;
}
}