diff --git a/Calculator/pom.xml b/Calculator/pom.xml index 004deb3..e0303d2 100644 --- a/Calculator/pom.xml +++ b/Calculator/pom.xml @@ -7,7 +7,10 @@ io.michaelcane bestcalculator 1.0-SNAPSHOT - + + 1.8 + 1.8 + junit diff --git a/Calculator/src/test/java/io/michaelcane/CalculatorSpec.java b/Calculator/src/test/java/io/michaelcane/CalculatorSpec.java index 75d3083..b4ba3c8 100644 --- a/Calculator/src/test/java/io/michaelcane/CalculatorSpec.java +++ b/Calculator/src/test/java/io/michaelcane/CalculatorSpec.java @@ -215,6 +215,15 @@ public class CalculatorSpec { assertEquals("This should evaluate to 1000000000", expectedValue, actualValue, delta); } + @Test + public void test$addAndMultiply() { + /** + * This will give the inverse for logarithms. + */ + double expectedValue = 18; + double actualValue = calculator.addAndMultiply(2,6,3); + assertEquals("This should evaluate to 16", expectedValue, actualValue, delta); + } diff --git a/Calculator/target/classes/io/michaelcane/App.class b/Calculator/target/classes/io/michaelcane/App.class index e93e35c..d3422ea 100644 Binary files a/Calculator/target/classes/io/michaelcane/App.class and b/Calculator/target/classes/io/michaelcane/App.class differ diff --git a/Calculator/target/classes/io/michaelcane/Calculator.class b/Calculator/target/classes/io/michaelcane/Calculator.class index 4feb663..5c2c6b6 100644 Binary files a/Calculator/target/classes/io/michaelcane/Calculator.class and b/Calculator/target/classes/io/michaelcane/Calculator.class differ diff --git a/Calculator/target/classes/io/michaelcane/Commands$1.class b/Calculator/target/classes/io/michaelcane/Commands$1.class deleted file mode 100644 index 3a52985..0000000 Binary files a/Calculator/target/classes/io/michaelcane/Commands$1.class and /dev/null differ diff --git a/Calculator/target/classes/io/michaelcane/Commands$Command.class b/Calculator/target/classes/io/michaelcane/Commands$Command.class index eeed41e..0ada424 100644 Binary files a/Calculator/target/classes/io/michaelcane/Commands$Command.class and b/Calculator/target/classes/io/michaelcane/Commands$Command.class differ diff --git a/Calculator/target/classes/io/michaelcane/Commands.class b/Calculator/target/classes/io/michaelcane/Commands.class index b066d77..b3c467e 100644 Binary files a/Calculator/target/classes/io/michaelcane/Commands.class and b/Calculator/target/classes/io/michaelcane/Commands.class differ diff --git a/Calculator/target/classes/io/michaelcane/Display.class b/Calculator/target/classes/io/michaelcane/Display.class index cdad32a..be0035e 100644 Binary files a/Calculator/target/classes/io/michaelcane/Display.class and b/Calculator/target/classes/io/michaelcane/Display.class differ diff --git a/Calculator/target/classes/io/michaelcane/User.class b/Calculator/target/classes/io/michaelcane/User.class index 9e06172..ef1f414 100644 Binary files a/Calculator/target/classes/io/michaelcane/User.class and b/Calculator/target/classes/io/michaelcane/User.class differ diff --git a/Calculator/target/test-classes/io/michaelcane/CalculatorSpec.class b/Calculator/target/test-classes/io/michaelcane/CalculatorSpec.class index 6879c03..a1c5ab5 100644 Binary files a/Calculator/target/test-classes/io/michaelcane/CalculatorSpec.class and b/Calculator/target/test-classes/io/michaelcane/CalculatorSpec.class differ diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..462200c --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,25 @@ +pipeline { + agent any + stages { + stage('Build') { + steps { + echo 'Building..' + sh 'cd Calculator && mvn test' + + } + } + stage('SonarQube analysis') { +// def scannerHome = tool 'SonarScanner 4.0'; + steps{ + withSonarQubeEnv('sonarqube-env') + { + // If you have configured more than one global server connection, you can specify its name +// sh "${scannerHome}/bin/sonar-scanner" + sh "cd Calculator && mvn sonar:sonar" + } + } + } + + } + +} \ No newline at end of file