Added test for bld example
This commit is contained in:
parent
d6f25e6b48
commit
4440fe0373
2 changed files with 16 additions and 3 deletions
|
@ -21,8 +21,7 @@ public class ExampleBuild extends Project {
|
||||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
||||||
|
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("net.thauvin.erik", "semver",
|
.include(dependency("net.thauvin.erik", "semver", version(1, 2, 1, "SNAPSHOT")));
|
||||||
version(1, 2, 1, "SNAPSHOT")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@BuildCommand(summary = "Run the example")
|
@BuildCommand(summary = "Run the example")
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
package com.example;
|
package com.example;
|
||||||
|
|
||||||
public class ExampleTest {
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue