summaryrefslogtreecommitdiff
path: root/scalalib/test/resources/hello-java/core
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-04-08 12:55:30 -0700
committerLi Haoyi <haoyi.sg@gmail.com>2018-04-08 12:55:30 -0700
commit62a18754179d74252668879c42e1c5d6a45fbdce (patch)
tree99a820224293a2367c116272283fd2a3426957ae /scalalib/test/resources/hello-java/core
parentdbcad35c05f1726f26b8033524e8fdd3d68b2de9 (diff)
downloadmill-62a18754179d74252668879c42e1c5d6a45fbdce.tar.gz
mill-62a18754179d74252668879c42e1c5d6a45fbdce.tar.bz2
mill-62a18754179d74252668879c42e1c5d6a45fbdce.zip
Enable JUnit testing, via sbt-test-interface, for `JavaModule`s
Diffstat (limited to 'scalalib/test/resources/hello-java/core')
-rw-r--r--scalalib/test/resources/hello-java/core/src/hello/Core.java1
-rw-r--r--scalalib/test/resources/hello-java/core/test/src/hello/MyCoreTests.java15
2 files changed, 15 insertions, 1 deletions
diff --git a/scalalib/test/resources/hello-java/core/src/hello/Core.java b/scalalib/test/resources/hello-java/core/src/hello/Core.java
index bef1a5a0..3ecb1f61 100644
--- a/scalalib/test/resources/hello-java/core/src/hello/Core.java
+++ b/scalalib/test/resources/hello-java/core/src/hello/Core.java
@@ -4,5 +4,4 @@ public class Core{
public static String msg(){
return "Hello World";
}
-
} \ No newline at end of file
diff --git a/scalalib/test/resources/hello-java/core/test/src/hello/MyCoreTests.java b/scalalib/test/resources/hello-java/core/test/src/hello/MyCoreTests.java
new file mode 100644
index 00000000..38bebaeb
--- /dev/null
+++ b/scalalib/test/resources/hello-java/core/test/src/hello/MyCoreTests.java
@@ -0,0 +1,15 @@
+package hello;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+public class MyCoreTests {
+ @Test
+ public void msgTest() {
+ assertEquals(Core.msg(), "Hello World!!");
+ }
+ @Test
+ public void lengthTest() {
+ assertEquals(Core.msg().length(), 11);
+ }
+} \ No newline at end of file