diff --git a/scm_demo b/scm_demo
new file mode 100644
index 00000000000..8e05d6eaf96
--- /dev/null
+++ b/scm_demo
@@ -0,0 +1,6 @@
+node {
+
+ def scmVars = checkout scm
+ def commitHash = scmVars.GIT_COMMIT
+ echo commitHash
+}
diff --git a/src/main/java/in/javahome/myweb/controller/Calculator.java b/src/main/java/in/javahome/myweb/controller/Calculator.java
index 6eba58e4ee3..06fa3707381 100755
--- a/src/main/java/in/javahome/myweb/controller/Calculator.java
+++ b/src/main/java/in/javahome/myweb/controller/Calculator.java
@@ -9,6 +9,8 @@ public class Calculator {
* @return int
*/
public int add(int i, int j){
+ String s = null;
+ s.toString();
return i+j;
}
public int multiply(int i, int j){
diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index 02ec0639f45..d741fbdc309 100755
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -11,7 +11,7 @@
-
Javahome App - 0.0.3
+ Javahome Webhook demo @ 2019
diff --git a/src/test/java/in/javahome/myweb/controller/CalculatorTest.java b/src/test/java/in/javahome/myweb/controller/CalculatorTest.java
index e815aade1f8..140d8d2c23d 100755
--- a/src/test/java/in/javahome/myweb/controller/CalculatorTest.java
+++ b/src/test/java/in/javahome/myweb/controller/CalculatorTest.java
@@ -1,14 +1,53 @@
package in.javahome.myweb.controller;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Properties;
+
import junit.framework.Assert;
import junit.framework.TestCase;
public class CalculatorTest extends TestCase {
Calculator cal = new Calculator();
- public void testAdd(){
- Assert.assertEquals(cal.add(10, 20), 30);
+
+ public void testAdd() {
+ Properties prop = new Properties();
+
+ OutputStream output = null;
+
+ try
+ {
+
+ output = new FileOutputStream("../config.properties");
+
+ // set the properties value
+ prop.setProperty("database", "localhost");
+ prop.setProperty("dbuser", "hari");
+ prop.setProperty("dbpassword", "password");
+
+ // save properties to project root folder
+ prop.store(output, null);
+
+ }catch(
+ IOException io)
+ {
+ io.printStackTrace();
+ }finally
+ {
+ if (output != null) {
+ try {
+ output.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ }
}
- public void testMultiply(){
+
+ public void testMultiply() {
Assert.assertEquals(cal.multiply(10, 20), 200);
}
}
diff --git a/venkatesh b/venkatesh
new file mode 100644
index 00000000000..a4e60c97846
--- /dev/null
+++ b/venkatesh
@@ -0,0 +1 @@
+Hi venkatesh how are you