Tests for equals and hashCode for SciProject and assciated classes,
JenkinsFilepull/1/head
parent
8efe522fe3
commit
92d83d62ab
|
|
@ -0,0 +1,48 @@
|
|||
pipeline {
|
||||
agent any
|
||||
tools {
|
||||
maven 'apache-maven-3.6.0'
|
||||
}
|
||||
stages {
|
||||
stage('Build and Test') {
|
||||
steps {
|
||||
dir('') {
|
||||
// sh 'mvn clean package test -Pwildfly-remote-h2-mem'
|
||||
sh 'mvn clean package -Pwildfly-remote-h2-mem'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'sudo systemctl restart wildfly'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("Analyse") {
|
||||
steps {
|
||||
dir('') {
|
||||
sh 'mvn package pmd:pmd pmd:cpd spotbugs:spotbugs'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
mail to: 'developers@scientificcms.org',
|
||||
subject: "${currentBuild.fullDisplayName} was successful",
|
||||
body: "Build ${env.BUILD_URL} was successful."
|
||||
}
|
||||
failure {
|
||||
mail to: 'developers@scientificcms.org',
|
||||
subject: "${currentBuild.fullDisplayName} FAILED!!!",
|
||||
body: "Build ${env.BUILD_URL} failed."
|
||||
}
|
||||
always {
|
||||
junit testResults: '**/target/surefire-reports/*.xml'
|
||||
|
||||
recordIssues enabledForFailure: true, tools: [java(), javaDoc()]
|
||||
recordIssues enabledForFailure: false, tool: spotBugs()
|
||||
recordIssues enabledForFailure: false, tool: cpd(pattern: '**/target/cpd.xml')
|
||||
recordIssues enabledForFailure: false, tool: pmdParser(pattern: '**/target/pmd.xml')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.contenttypes.sciproject;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
import org.libreccm.tests.categories.UnitTest;
|
||||
import org.libreccm.testutils.EqualsVerifier;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RunWith(Parameterized.class)
|
||||
@org.junit.experimental.categories.Category(UnitTest.class)
|
||||
public class EqualsAndHashCodeTest extends EqualsVerifier {
|
||||
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
public static Collection<Class<?>> data() {
|
||||
|
||||
return Arrays.asList(new Class<?>[]{
|
||||
Contact.class,
|
||||
Membership.class,
|
||||
SciProject.class
|
||||
});
|
||||
}
|
||||
|
||||
public EqualsAndHashCodeTest(final Class<?> clazz) {
|
||||
super(clazz);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue