[dasher] Attempt to create some unit tests for java (#158)
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher] Attempt to create some unit tests for java (#158)
- Date: Wed, 19 Aug 2020 10:32:53 +0000 (UTC)
commit e44765292d11638f3a918da592ea4b4b32bea754
Author: Merve <mervemalli97 gmail com>
Date: Tue Apr 3 03:18:08 2018 +0300
Attempt to create some unit tests for java (#158)
* Unit Test added for CAlphabetMap
* trying to see if travis will work
* added one unit test
* clean up the test
java/src/test/java/dasher/CAlphabetMapTest.java | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
---
diff --git a/java/src/test/java/dasher/CAlphabetMapTest.java b/java/src/test/java/dasher/CAlphabetMapTest.java
new file mode 100644
index 00000000..f4686737
--- /dev/null
+++ b/java/src/test/java/dasher/CAlphabetMapTest.java
@@ -0,0 +1,24 @@
+package dasher;
+import org.junit.Test;
+import org.junit.Before;
+import static org.junit.Assert.*;
+
+public class CAlphabetMapTest {
+
+ CAlphabetMap map = new CAlphabetMap(5);
+
+ @Before
+ public void setUp(){
+ map.Add("key", 2);
+ }
+
+ @Test
+ public void gettingValueMapContains() {
+ assertEquals(map.Get("key").symbol, 2);
+ }
+
+ @Test
+ public void gettingValueMapDoesNotContain() {
+ assertEquals(map.Get("notExists").symbol, 0);
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]