From 7b53b4679314bea284ea578a318d3f3399f704d3 Mon Sep 17 00:00:00 2001 From: Daniel Pocock Date: Wed, 11 Jul 2018 20:20:55 +0200 Subject: [PATCH 1/8] unit test: Fix package name --- .../{ => org/omnidial/harvest}/TelCandidateHarvesterTest.java | 2 ++ 1 file changed, 2 insertions(+) rename core/src/test/java/{ => org/omnidial/harvest}/TelCandidateHarvesterTest.java (93%) diff --git a/core/src/test/java/TelCandidateHarvesterTest.java b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java similarity index 93% rename from core/src/test/java/TelCandidateHarvesterTest.java rename to core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java index 3f76d00..8f0e1cc 100644 --- a/core/src/test/java/TelCandidateHarvesterTest.java +++ b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java @@ -48,6 +48,8 @@ public void test2() { TelCandidateHarvester h2 = new TelCandidateHarvester(); h2.addListener(t2); String number = "9971pranav"; + System.out.println(" first print test2:"+number); + System.out.println(" second print test2:"+number); h2.getCandidatesForNumber(number,"extra"); assertEquals(t2.dcArray.size(),1); assertEquals(number, t2.dcArray.get(0).address); From 2cfb7ff05abc05080a70446172ced6773d9f4a7f Mon Sep 17 00:00:00 2001 From: Milena Lavanchy Date: Thu, 12 Jul 2018 20:27:17 +0200 Subject: [PATCH 2/8] Add System.out.println("print test2:"+number); --- .../java/org/omnidial/harvest/TelCandidateHarvesterTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java index 8f0e1cc..3ef7933 100644 --- a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java +++ b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java @@ -48,8 +48,7 @@ public void test2() { TelCandidateHarvester h2 = new TelCandidateHarvester(); h2.addListener(t2); String number = "9971pranav"; - System.out.println(" first print test2:"+number); - System.out.println(" second print test2:"+number); + System.out.println("print test2:"+number); h2.getCandidatesForNumber(number,"extra"); assertEquals(t2.dcArray.size(),1); assertEquals(number, t2.dcArray.get(0).address); From c63f33dc7b30d40e2bcde3ed1d0221df229fd862 Mon Sep 17 00:00:00 2001 From: Milena Lavanchy Date: Thu, 12 Jul 2018 20:39:00 +0200 Subject: [PATCH 3/8] Add System.out.println("print test2:"+number) --- .../java/org/omnidial/harvest/TelCandidateHarvesterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java index 3ef7933..d249dc8 100644 --- a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java +++ b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java @@ -48,7 +48,7 @@ public void test2() { TelCandidateHarvester h2 = new TelCandidateHarvester(); h2.addListener(t2); String number = "9971pranav"; - System.out.println("print test2:"+number); + System.out.println("print test2:"+number); h2.getCandidatesForNumber(number,"extra"); assertEquals(t2.dcArray.size(),1); assertEquals(number, t2.dcArray.get(0).address); From 7e038473439da7f2bd4219ad0d3254d2ea76edf2 Mon Sep 17 00:00:00 2001 From: Milena Lavanchy Date: Thu, 12 Jul 2018 20:48:45 +0200 Subject: [PATCH 4/8] Add System.out.println("print test2:"+number) --- .../java/org/omnidial/harvest/TelCandidateHarvesterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java index d249dc8..3ef7933 100644 --- a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java +++ b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java @@ -48,7 +48,7 @@ public void test2() { TelCandidateHarvester h2 = new TelCandidateHarvester(); h2.addListener(t2); String number = "9971pranav"; - System.out.println("print test2:"+number); + System.out.println("print test2:"+number); h2.getCandidatesForNumber(number,"extra"); assertEquals(t2.dcArray.size(),1); assertEquals(number, t2.dcArray.get(0).address); From e072cfa011b7f3740b541cc429611d1d57b10060 Mon Sep 17 00:00:00 2001 From: Milena Lavanchy Date: Thu, 12 Jul 2018 21:05:25 +0200 Subject: [PATCH 5/8] Add System.out.println("print1 test2:"+number) --- android/.classpath | 27 +++++++++++++++++++ .../harvest/TelCandidateHarvesterTest.java | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 android/.classpath diff --git a/android/.classpath b/android/.classpath new file mode 100644 index 0000000..e51e38c --- /dev/null +++ b/android/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java index 3ef7933..45a6748 100644 --- a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java +++ b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java @@ -48,7 +48,7 @@ public void test2() { TelCandidateHarvester h2 = new TelCandidateHarvester(); h2.addListener(t2); String number = "9971pranav"; - System.out.println("print test2:"+number); + System.out.println("print1 test2:"+number); h2.getCandidatesForNumber(number,"extra"); assertEquals(t2.dcArray.size(),1); assertEquals(number, t2.dcArray.get(0).address); From f74621bbee737247e79022559d4b3f39fb31a907 Mon Sep 17 00:00:00 2001 From: Milena Lavanchy Date: Thu, 12 Jul 2018 21:38:15 +0200 Subject: [PATCH 6/8] test --- .../java/org/omnidial/harvest/TelCandidateHarvesterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java index 45a6748..cbd2e7b 100644 --- a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java +++ b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java @@ -48,7 +48,7 @@ public void test2() { TelCandidateHarvester h2 = new TelCandidateHarvester(); h2.addListener(t2); String number = "9971pranav"; - System.out.println("print1 test2:"+number); + System.out.println("print1 test2:"+number); h2.getCandidatesForNumber(number,"extra"); assertEquals(t2.dcArray.size(),1); assertEquals(number, t2.dcArray.get(0).address); From a63b507478e812c9cad10dc4114fab53c218e89b Mon Sep 17 00:00:00 2001 From: Milena Lavanchy Date: Thu, 12 Jul 2018 22:34:35 +0200 Subject: [PATCH 7/8] Add System.out.println("print1 test2:"+number) --- .../java/org/omnidial/harvest/TelCandidateHarvesterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java index cbd2e7b..45a6748 100644 --- a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java +++ b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java @@ -48,7 +48,7 @@ public void test2() { TelCandidateHarvester h2 = new TelCandidateHarvester(); h2.addListener(t2); String number = "9971pranav"; - System.out.println("print1 test2:"+number); + System.out.println("print1 test2:"+number); h2.getCandidatesForNumber(number,"extra"); assertEquals(t2.dcArray.size(),1); assertEquals(number, t2.dcArray.get(0).address); From ec300be4d457bc509823f5917ea234c019457807 Mon Sep 17 00:00:00 2001 From: Milena Lavanchy Date: Thu, 12 Jul 2018 23:28:45 +0200 Subject: [PATCH 8/8] Reverse the order of the arguments of assertEquals --- .../omnidial/harvest/TelCandidateHarvesterTest.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java index 45a6748..3fa488f 100644 --- a/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java +++ b/core/src/test/java/org/omnidial/harvest/TelCandidateHarvesterTest.java @@ -27,8 +27,8 @@ public void test() { h.addListener(t); String number = "997180330"; h.getCandidatesForNumber(number,"extra"); - assertEquals(t.dcArray.size(),1); - assertEquals(number, t.dcArray.get(0).address); + assertEquals(1,t.dcArray.size()); + assertEquals(t.dcArray.get(0).address,number); } @Test @@ -38,8 +38,8 @@ public void test1() { h1.addListener(t1); String number = "pranav"; h1.getCandidatesForNumber(number,"extra"); - assertEquals(t1.dcArray.size(),1); - assertEquals(number, t1.dcArray.get(0).address); + assertEquals(1, t1.dcArray.size()); + assertEquals(t1.dcArray.get(0).address, number); } @Test @@ -48,10 +48,9 @@ public void test2() { TelCandidateHarvester h2 = new TelCandidateHarvester(); h2.addListener(t2); String number = "9971pranav"; - System.out.println("print1 test2:"+number); h2.getCandidatesForNumber(number,"extra"); - assertEquals(t2.dcArray.size(),1); - assertEquals(number, t2.dcArray.get(0).address); + assertEquals(1, t2.dcArray.size()); + assertEquals(t2.dcArray.get(0).address,number); }