Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alex #3

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Calculator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
<groupId>io.michaelcane</groupId>
<artifactId>bestcalculator</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
Expand Down
9 changes: 9 additions & 0 deletions Calculator/src/test/java/io/michaelcane/CalculatorSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}



Expand Down
Binary file modified Calculator/target/classes/io/michaelcane/App.class
Binary file not shown.
Binary file modified Calculator/target/classes/io/michaelcane/Calculator.class
Binary file not shown.
Binary file not shown.
Binary file modified Calculator/target/classes/io/michaelcane/Commands$Command.class
Binary file not shown.
Binary file modified Calculator/target/classes/io/michaelcane/Commands.class
Binary file not shown.
Binary file modified Calculator/target/classes/io/michaelcane/Display.class
Binary file not shown.
Binary file modified Calculator/target/classes/io/michaelcane/User.class
Binary file not shown.
Binary file modified Calculator/target/test-classes/io/michaelcane/CalculatorSpec.class
Binary file not shown.
25 changes: 25 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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"
}
}
}

}

}