Initial commit
This commit is contained in:
commit
da53dbf3d6
75 changed files with 2776 additions and 0 deletions
35
examples/src/bld/java/com/example/ExamplesBuild.java
Normal file
35
examples/src/bld/java/com/example/ExamplesBuild.java
Normal file
|
@ -0,0 +1,35 @@
|
|||
package com.example;
|
||||
|
||||
import rife.bld.BuildCommand;
|
||||
import rife.bld.BaseProject;
|
||||
import rife.bld.extension.TestNgOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
|
||||
import static rife.bld.dependencies.Scope.test;
|
||||
|
||||
public class ExamplesBuild extends BaseProject {
|
||||
public ExamplesBuild() {
|
||||
pkg = "com.example";
|
||||
name = "Examples";
|
||||
version = version(0,1,0);
|
||||
|
||||
repositories = List.of(MAVEN_CENTRAL);
|
||||
scope(test).include(dependency("org.testng", "testng", version(7, 8, 0)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new ExamplesBuild().start(args);
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Run tests with TestNG")
|
||||
public void testng() throws Exception {
|
||||
new TestNgOperation()
|
||||
.fromProject(this)
|
||||
.packages("com.example")
|
||||
.execute();
|
||||
}
|
||||
}
|
7
examples/src/main/java/com/example/ExamplesLib.java
Normal file
7
examples/src/main/java/com/example/ExamplesLib.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package com.example;
|
||||
|
||||
public class ExamplesLib {
|
||||
public String getMessage() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
20
examples/src/test/java/com/example/ExamplesTest.java
Normal file
20
examples/src/test/java/com/example/ExamplesTest.java
Normal file
|
@ -0,0 +1,20 @@
|
|||
package com.example;
|
||||
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
class ExampleTest {
|
||||
@Test
|
||||
void verifyHello() {
|
||||
Assert.assertTrue(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testFail() {
|
||||
Assert.fail("failed");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new ExampleTest().verifyHello();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue