Integrate with Junit (v1.0.0)
- Add below code in your unit testfile, say,
Sample_Test.java
intest/java
directory.
@Test
public void TestKeploy() throws InterruptedException {
CountDownLatch countDownLatch = HaltThread.getInstance().getCountDownLatch();
mode.setTestMode();
new Thread(() -> {
SamplesJavaApplication.main(new String[]{""});
countDownLatch.countDown();
}).start();
countDownLatch.await();
}
- Run
mvn test