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

Add descriptors test #84

Open
wants to merge 1 commit 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package hudson.plugins.violations.types.checkstyle;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertTrue;

public class CheckstyleDescriptorTest {

@Test
public void testMavenTargets() {
CheckstyleDescriptor checkstyleDescriptor = new CheckstyleDescriptor();

List<String> mavenTargets = checkstyleDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("checkstyle-result.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package hudson.plugins.violations.types.codenarc;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertTrue;

public class CodenarcDescriptorTest {

@Test
public void testMavenTargets() {
CodenarcDescriptor codenarcDescriptor = new CodenarcDescriptor();

List<String> mavenTargets = codenarcDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("CodeNarcXmlReport.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package hudson.plugins.violations.types.cpd;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertTrue;

public class CPDDescriptorTest {

@Test
public void testMavenTargets() {
CPDDescriptor cpdDescriptor = new CPDDescriptor();

List<String> mavenTargets = cpdDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("cpd.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package hudson.plugins.violations.types.csslint;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertTrue;

public class CssLintDescriptorTest {

@Test
public void testMavenTargets() {
CssLintDescriptor cssLintDescriptor = new CssLintDescriptor();

List<String> mavenTargets = cssLintDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("csslint.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hudson.plugins.violations.types.findbugs;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertTrue;

public class FindBugsDescriptorTest {

@Test
public void testMavenTargets() {
FindBugsDescriptor findBugsDescriptor = new FindBugsDescriptor();

List<String> mavenTargets = findBugsDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("findbugsXml.xml"));
assertTrue(mavenTargets.contains("findbugs.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package hudson.plugins.violations.types.fxcop;

import org.junit.Test;

import static org.junit.Assert.assertNotNull;

public class FxCopDescriptorTest {

@Test
public void testParserCreation() {
FxCopDescriptor fxCopDescriptor = new FxCopDescriptor();

assertNotNull(fxCopDescriptor.createParser());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package hudson.plugins.violations.types.gendarme;

import org.junit.Test;

import static org.junit.Assert.assertNotNull;

public class GendarmeDescriptorTest {

@Test
public void testParserCreation() {
GendarmeDescriptor gendarmeDescriptor = new GendarmeDescriptor();

assertNotNull(gendarmeDescriptor.createParser());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package hudson.plugins.violations.types.jcreport;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

public class JcReportDescriptorTest {

@Test
public void testParserCreation() {
JcReportDescriptor jcReportDescriptor = new JcReportDescriptor();

assertNotNull(jcReportDescriptor.createParser());
}

@Test
public void testMavenTargets() {
JcReportDescriptor jcReportDescriptor = new JcReportDescriptor();

List<String> mavenTargets = jcReportDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("jcoderz-report.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package hudson.plugins.violations.types.jslint;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

public class JsLintDescriptorTest {

@Test
public void testParserCreation() {
JsLintDescriptor jsLintDescriptor = new JsLintDescriptor();

assertNotNull(jsLintDescriptor.createParser());
}

@Test
public void testMavenTargets() {
JsLintDescriptor jsLintDescriptor = new JsLintDescriptor();

List<String> mavenTargets = jsLintDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("jslint.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package hudson.plugins.violations.types.pmd;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertTrue;

public class PMDDescriptorTest {

@Test
public void testMavenTargets() {
PMDDescriptor pmdDescriptor = new PMDDescriptor();

List<String> mavenTargets = pmdDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("pmd.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package hudson.plugins.violations.types.resharper;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertTrue;

public class ReSharperDescriptorTest {

@Test
public void testMavenTargets() {
ReSharperDescriptor reSharperDescriptor = new ReSharperDescriptor();

List<String> mavenTargets = reSharperDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("resharper.xml"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package hudson.plugins.violations.types.simian;

import org.junit.Test;

import static org.junit.Assert.assertNotNull;

public class SimianDescriptorTest {

@Test
public void testParserCreation() {
SimianDescriptor simianDescriptor = new SimianDescriptor();

assertNotNull(simianDescriptor.createParser());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package hudson.plugins.violations.types.stylecop;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

public class StyleCopDescriptorTest {

@Test
public void testParserCreation() {
StyleCopDescriptor styleCopDescriptor = new StyleCopDescriptor();

assertNotNull(styleCopDescriptor.createParser());
}

@Test
public void testMavenTargets() {
StyleCopDescriptor styleCopDescriptor = new StyleCopDescriptor();

List<String> mavenTargets = styleCopDescriptor.getMavenTargets();

assertTrue(mavenTargets.contains("SourceAnalysisViolations.xml"));
}
}