Repository: authorjapps/zerocode
Pull request #3 (2016-07-29 12:23:39)

Issue2 external json payload
Issue: https://github.com/authorjapps/zerocode/issues/2


Patch:
diff --git a/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeJUnitRunner.java b/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunner.java
similarity index 96%
rename from src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeJUnitRunner.java
rename to src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunner.java
index ff87a58c..c75e27b7 100644
--- a/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeJUnitRunner.java
+++ b/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunner.java
@@ -21,8 +21,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
-public class ZeroCodeJUnitRunner extends BlockJUnit4ClassRunner {
-    private static final Logger logger = LoggerFactory.getLogger(ZeroCodeJUnitRunner.class);
+public class ZeroCodeUnitRunner extends BlockJUnit4ClassRunner {
+    private static final Logger logger = LoggerFactory.getLogger(ZeroCodeUnitRunner.class);
 
     static int i = 1;
     protected boolean passed;
@@ -41,7 +41,7 @@ public class ZeroCodeJUnitRunner extends BlockJUnit4ClassRunner {
     List<String> smartTestCaseNames = new ArrayList<>();
     String currentTestCase;
 
-    public ZeroCodeJUnitRunner(Class<?> klass) throws InitializationError {
+    public ZeroCodeUnitRunner(Class<?> klass) throws InitializationError {
         super(klass);
 
         this.testClass = klass;
diff --git a/src/main/java/org/jsmart/zerocode/core/verify/SmartJUnitNavigatorVerification.java b/src/main/java/org/jsmart/zerocode/core/verify/SmartJUnitNavigatorVerification.java
index f01b857d..4f57d588 100644
--- a/src/main/java/org/jsmart/zerocode/core/verify/SmartJUnitNavigatorVerification.java
+++ b/src/main/java/org/jsmart/zerocode/core/verify/SmartJUnitNavigatorVerification.java
@@ -2,12 +2,12 @@ package org.jsmart.zerocode.core.verify;
 
 import org.jsmart.zerocode.core.domain.JsonTestCase;
 import org.jsmart.zerocode.core.domain.TargetEnv;
-import org.jsmart.zerocode.core.runner.ZeroCodeJUnitRunner;
+import org.jsmart.zerocode.core.runner.ZeroCodeUnitRunner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
 @TargetEnv("config_hosts.properties")
-@RunWith(ZeroCodeJUnitRunner.class)
+@RunWith(ZeroCodeUnitRunner.class)
 public class SmartJUnitNavigatorVerification {
 
     @JsonTestCase("01_verification_test_cases/01_REST_end_point_GET_PASS.json")
diff --git a/src/main/java/org/trick/JSON2CSV.java b/src/main/java/org/jsmart/zerocode/core/zzignored/trick/JSON2CSV.java
similarity index 96%
rename from src/main/java/org/trick/JSON2CSV.java
rename to src/main/java/org/jsmart/zerocode/core/zzignored/trick/JSON2CSV.java
index 7621de90..84d9bccf 100644
--- a/src/main/java/org/trick/JSON2CSV.java
+++ b/src/main/java/org/jsmart/zerocode/core/zzignored/trick/JSON2CSV.java
@@ -1,4 +1,4 @@
-package org.trick;
+package org.jsmart.zerocode.core.zzignored.trick;
 
 import java.io.File;
 import java.io.IOException;
diff --git a/src/main/java/org/trick/JacksonCsv.java b/src/main/java/org/jsmart/zerocode/core/zzignored/trick/JacksonCsv.java
similarity index 93%
rename from src/main/java/org/trick/JacksonCsv.java
rename to src/main/java/org/jsmart/zerocode/core/zzignored/trick/JacksonCsv.java
index c483d4a1..e72e29d2 100644
--- a/src/main/java/org/trick/JacksonCsv.java
+++ b/src/main/java/org/jsmart/zerocode/core/zzignored/trick/JacksonCsv.java
@@ -1,7 +1,5 @@
-package org.trick;
+package org.jsmart.zerocode.core.zzignored.trick;
 
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectWriter;
 import com.fasterxml.jackson.dataformat.csv.CsvMapper;
 import com.fasterxml.jackson.dataformat.csv.CsvParser;
diff --git a/src/main/java/org/trick/LogHello.java b/src/main/java/org/jsmart/zerocode/core/zzignored/trick/LogHello.java
similarity index 84%
rename from src/main/java/org/trick/LogHello.java
rename to src/main/java/org/jsmart/zerocode/core/zzignored/trick/LogHello.java
index 248ccba7..bafa0a0e 100644
--- a/src/main/java/org/trick/LogHello.java
+++ b/src/main/java/org/jsmart/zerocode/core/zzignored/trick/LogHello.java
@@ -1,4 +1,4 @@
-package org.trick;
+package org.jsmart.zerocode.core.zzignored.trick;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/src/main/java/org/trick/NotifierFuncMain.java b/src/main/java/org/jsmart/zerocode/core/zzignored/trick/NotifierFuncMain.java
similarity index 96%
rename from src/main/java/org/trick/NotifierFuncMain.java
rename to src/main/java/org/jsmart/zerocode/core/zzignored/trick/NotifierFuncMain.java
index 6c142896..f799d6bb 100644
--- a/src/main/java/org/trick/NotifierFuncMain.java
+++ b/src/main/java/org/jsmart/zerocode/core/zzignored/trick/NotifierFuncMain.java
@@ -1,4 +1,4 @@
-package org.trick;
+package org.jsmart.zerocode.core.zzignored.trick;
 
 import org.jsmart.zerocode.core.runner.Notifier;
 


Test patch:
diff --git a/src/main/java/org/jsmart/zerocode/core/mocking/WireMockJsonContentTesting.java b/src/main/java/org/jsmart/zerocode/core/zzignored/mocking/WireMockJsonContentTesting.java
similarity index 97%
rename from src/main/java/org/jsmart/zerocode/core/mocking/WireMockJsonContentTesting.java
rename to src/main/java/org/jsmart/zerocode/core/zzignored/mocking/WireMockJsonContentTesting.java
index d33a12a1..cd93e019 100644
--- a/src/main/java/org/jsmart/zerocode/core/mocking/WireMockJsonContentTesting.java
+++ b/src/main/java/org/jsmart/zerocode/core/zzignored/mocking/WireMockJsonContentTesting.java
@@ -1,4 +1,4 @@
-package org.jsmart.zerocode.core.mocking;
+package org.jsmart.zerocode.core.zzignored.mocking;
 
 import com.github.tomakehurst.wiremock.client.WireMock;
 import com.github.tomakehurst.wiremock.junit.WireMockRule;
diff --git a/src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeJUnitRunnerTest.java b/src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunnerTest.java
similarity index 69%
rename from src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeJUnitRunnerTest.java
rename to src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunnerTest.java
index 383710f2..9ba7f2db 100644
--- a/src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeJUnitRunnerTest.java
+++ b/src/test/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunnerTest.java
@@ -10,9 +10,9 @@ import org.junit.runner.notification.RunNotifier;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 
-public class ZeroCodeJUnitRunnerTest {
+public class ZeroCodeUnitRunnerTest {
 
-    ZeroCodeJUnitRunner zeroCodeJUnitRunner;
+    ZeroCodeUnitRunner zeroCodeUnitRunner;
 
     @Rule
     public ExpectedException expectedException = ExpectedException.none();
@@ -32,18 +32,18 @@ public class ZeroCodeJUnitRunnerTest {
 
     @Before
     public void initializeRunner() throws Exception {
-        zeroCodeJUnitRunner = new ZeroCodeJUnitRunner(TinySmartJUnitRunnerExampleTester.class);
+        zeroCodeUnitRunner = new ZeroCodeUnitRunner(TinySmartJUnitRunnerExampleTester.class);
     }
 
     @Test
     public void testWillReadTheAnnotationAndRunVia_BlockJunitRunner() throws Exception {
-        assertThat(zeroCodeJUnitRunner.getSmartTestCaseNames().size(), is(2));
-        assertThat(zeroCodeJUnitRunner.getSmartTestCaseNames().get(0), is("/mac-daddy"));
+        assertThat(zeroCodeUnitRunner.getSmartTestCaseNames().size(), is(2));
+        assertThat(zeroCodeUnitRunner.getSmartTestCaseNames().get(0), is("/mac-daddy"));
     }
 
     @Test
     public void testWillReadTheAnnotationAnd_Notify() throws Exception {
-        zeroCodeJUnitRunner.run(new RunNotifier());
-        assertThat(zeroCodeJUnitRunner.getCurrentTestCase(), is("/abcd/path"));
+        zeroCodeUnitRunner.run(new RunNotifier());
+        assertThat(zeroCodeUnitRunner.getCurrentTestCase(), is("/abcd/path"));
     }
 }
\ No newline at end of file
diff --git a/src/test/java/org/jsmart/zerocode/core/tests/SmartJUnitRunnerTestCases.java b/src/test/java/org/jsmart/zerocode/core/tests/SmartJUnitRunnerTestCases.java
index 0769bba4..28192a04 100644
--- a/src/test/java/org/jsmart/zerocode/core/tests/SmartJUnitRunnerTestCases.java
+++ b/src/test/java/org/jsmart/zerocode/core/tests/SmartJUnitRunnerTestCases.java
@@ -2,12 +2,12 @@ package org.jsmart.zerocode.core.tests;
 
 import org.jsmart.zerocode.core.domain.JsonTestCase;
 import org.jsmart.zerocode.core.domain.TargetEnv;
-import org.jsmart.zerocode.core.tests.customrunner.TestOnlyZeroCodeJUnitRunner;
+import org.jsmart.zerocode.core.tests.customrunner.TestOnlyZeroCodeUnitRunner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
 @TargetEnv("dev_test.properties")
-@RunWith(TestOnlyZeroCodeJUnitRunner.class)
+@RunWith(TestOnlyZeroCodeUnitRunner.class)
 public class SmartJUnitRunnerTestCases {
 
     @JsonTestCase("07_some_test_cases/01_REST_end_point_GET_PASS.json")
diff --git a/src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeJUnitRunner.java b/src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeUnitRunner.java
similarity index 63%
rename from src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeJUnitRunner.java
rename to src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeUnitRunner.java
index 0e9ce89a..1137c022 100644
--- a/src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeJUnitRunner.java
+++ b/src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeUnitRunner.java
@@ -1,14 +1,14 @@
 package org.jsmart.zerocode.core.tests.customrunner;
 
 import org.jsmart.simulator.main.SimpleRestJsonSimulatorsMain;
-import org.jsmart.zerocode.core.runner.ZeroCodeJUnitRunner;
+import org.jsmart.zerocode.core.runner.ZeroCodeUnitRunner;
 import org.junit.runners.model.InitializationError;
 
-public class TestOnlyZeroCodeJUnitRunner extends ZeroCodeJUnitRunner {
+public class TestOnlyZeroCodeUnitRunner extends ZeroCodeUnitRunner {
     SimpleRestJsonSimulatorsMain simulator ;
     public static final int PORT = 9999;
 
-    public TestOnlyZeroCodeJUnitRunner(Class<?> klass) throws InitializationError {
+    public TestOnlyZeroCodeUnitRunner(Class<?> klass) throws InitializationError {
         super(klass);
         simulator = new SimpleRestJsonSimulatorsMain(PORT);
         simulator.start();
diff --git a/src/test/java/org/jsmart/zerocode/core/verification/SmartJUnitNavigatorReportGen.java b/src/test/java/org/jsmart/zerocode/core/verification/SmartJUnitNavigatorReportGen.java
index 42d675ff..1a0bf977 100644
--- a/src/test/java/org/jsmart/zerocode/core/verification/SmartJUnitNavigatorReportGen.java
+++ b/src/test/java/org/jsmart/zerocode/core/verification/SmartJUnitNavigatorReportGen.java
@@ -2,14 +2,12 @@ package org.jsmart.zerocode.core.verification;
 
 import org.jsmart.zerocode.core.domain.JsonTestCase;
 import org.jsmart.zerocode.core.domain.TargetEnv;
-import org.jsmart.zerocode.core.tests.customrunner.TestOnlyZeroCodeJUnitRunner;
+import org.jsmart.zerocode.core.tests.customrunner.TestOnlyZeroCodeUnitRunner;
 import org.junit.Test;
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
 import org.junit.runner.RunWith;
 
 @TargetEnv("config_hosts.properties")
-@RunWith(TestOnlyZeroCodeJUnitRunner.class)
+@RunWith(TestOnlyZeroCodeUnitRunner.class)
 public class SmartJUnitNavigatorReportGen {
 
     @Test
diff --git a/src/test/java/org/jsmart/zerocode/core/verification/SmartJUnitNavigatorVerification.java b/src/test/java/org/jsmart/zerocode/core/verification/SmartJUnitNavigatorVerification.java
index fa79d086..d87a8170 100644
--- a/src/test/java/org/jsmart/zerocode/core/verification/SmartJUnitNavigatorVerification.java
+++ b/src/test/java/org/jsmart/zerocode/core/verification/SmartJUnitNavigatorVerification.java
@@ -2,16 +2,13 @@ package org.jsmart.zerocode.core.verification;
 
 import org.jsmart.zerocode.core.domain.JsonTestCase;
 import org.jsmart.zerocode.core.domain.TargetEnv;
-import org.jsmart.zerocode.core.tests.customrunner.TestOnlyZeroCodeJUnitRunner;
+import org.jsmart.zerocode.core.tests.customrunner.TestOnlyZeroCodeUnitRunner;
 import org.junit.Test;
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Result;
 import org.junit.runner.RunWith;
-import org.junit.runner.notification.Failure;
 
 @TargetEnv("config_hosts.properties")
-//@RunWith(ZeroCodeJUnitRunner.class)
-@RunWith(TestOnlyZeroCodeJUnitRunner.class)
+//@RunWith(ZeroCodeUnitRunner.class)
+@RunWith(TestOnlyZeroCodeUnitRunner.class)
 public class SmartJUnitNavigatorVerification {
 
     @JsonTestCase("01_verification_test_cases/01_REST_end_point_GET_PASS.json")