Merge pull request #5333 from amit2103/BAEL-9017

[BAEL-9017] - Fixed PMD violations and added in main pom.xml
This commit is contained in:
Loredana Crusoveanu 2018-09-29 22:09:19 +03:00 committed by GitHub
commit aad613a25e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 28 additions and 28 deletions

View File

@ -7,7 +7,7 @@ import junit.framework.TestSuite;
/** /**
* Unit test for simple App. * Unit test for simple App.
*/ */
public class AppTest public class AppUnitTest
extends TestCase extends TestCase
{ {
/** /**
@ -15,7 +15,7 @@ public class AppTest
* *
* @param testName name of the test case * @param testName name of the test case
*/ */
public AppTest( String testName ) public AppUnitTest( String testName )
{ {
super( testName ); super( testName );
} }
@ -25,7 +25,7 @@ public class AppTest
*/ */
public static Test suite() public static Test suite()
{ {
return new TestSuite( AppTest.class ); return new TestSuite( AppUnitTest.class );
} }
/** /**

View File

@ -18,9 +18,9 @@ import org.junit.Test;
import com.stackify.models.User; import com.stackify.models.User;
import com.stackify.services.MyService; import com.stackify.services.MyService;
public class MyServiceTest { public class MyServiceUnitTest {
private static final Logger logger = LogManager.getLogger(MyServiceTest.class); private static final Logger logger = LogManager.getLogger(MyServiceUnitTest.class);
@Test @Test
public void testService() { public void testService() {

View File

@ -9,7 +9,7 @@ import com.stackify.models.Employee;
import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Level;
public class EmployeeServiceTest { public class EmployeeServiceUnitTest {
private static final Logger logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); private static final Logger logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
private EmployeeService employeeService = new EmployeeService(); private EmployeeService employeeService = new EmployeeService();

View File

@ -6,7 +6,7 @@ import io.restassured.RestAssured;
import static io.restassured.RestAssured.*; import static io.restassured.RestAssured.*;
import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.CoreMatchers.*;
public class UserServiceTest { public class UserServiceLiveTest {
@Test @Test
public void whenAddUser_thenGetUserOk() { public void whenAddUser_thenGetUserOk() {
RestAssured.baseURI = "http://localhost:8080/rest-server"; RestAssured.baseURI = "http://localhost:8080/rest-server";

View File

@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
public class DateDiffTest { public class DateDiffUnitTest {
@Test @Test
public void givenTwoDatesBeforeJava8_whenDifferentiating_thenWeGetSix() throws ParseException { public void givenTwoDatesBeforeJava8_whenDifferentiating_thenWeGetSix() throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy", Locale.ENGLISH); SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy", Locale.ENGLISH);

20
pom.xml
View File

@ -1081,8 +1081,8 @@
<!-- <module>libraries</module> <module>jmeter</module> --> <!-- <module>libraries</module> <module>jmeter</module> -->
<!--<module>java-dates</module> --> <!-- Commented because we have still not upgraded to java 9 --> <!--<module>java-dates</module> --> <!-- Commented because we have still not upgraded to java 9 -->
<module>java-websocket</module> <module>java-websocket</module>
<!-- <module>activejdbc</module> --><!-- PMD voilation --> <module>activejdbc</module>
<!-- <module>animal-sniffer-mvn-plugin</module> --><!-- PMD voilation --> <module>animal-sniffer-mvn-plugin</module>
<!-- <module>apache-avro</module> --><!-- Malformed POM --> <!-- <module>apache-avro</module> --><!-- Malformed POM -->
<module>apache-bval</module> <module>apache-bval</module>
<module>apache-shiro</module> <module>apache-shiro</module>
@ -1098,7 +1098,7 @@
<module>dubbo</module> <module>dubbo</module>
<!-- <module>flyway</module> --><!-- Malformed POM --> <!-- <module>flyway</module> --><!-- Malformed POM -->
<!-- <module>grpc</module> --><!-- protobuf-maven-plugin filecopy failure --> <!-- <module>grpc</module> --><!-- protobuf-maven-plugin filecopy failure -->
<!-- <module>java-difference-date</module> --><!-- PMD voilation --> <module>java-difference-date</module>
<!-- <module>JGit</module> --><!-- Unit test failure --> <!-- <module>JGit</module> --><!-- Unit test failure -->
<module>jni</module> <module>jni</module>
<module>jooby</module> <module>jooby</module>
@ -1106,13 +1106,13 @@
<!-- <module>microprofile</module> --><!-- Takes too much time : Downloads 93 MBs zip and .. --> <!-- <module>microprofile</module> --><!-- Takes too much time : Downloads 93 MBs zip and .. -->
<!-- <module>muleesb</module> --><!-- load main class org.mule.munit.remote.RemoteRunner --> <!-- <module>muleesb</module> --><!-- load main class org.mule.munit.remote.RemoteRunner -->
<module>ratpack</module> <module>ratpack</module>
<!-- <module>rest-with-spark-java</module> --><!-- PMD voilation --> <module>rest-with-spark-java</module>
<module>spring-boot-autoconfiguration</module> <module>spring-boot-autoconfiguration</module>
<module>spring-boot-custom-starter</module> <module>spring-boot-custom-starter</module>
<!-- <module>spring-boot-jasypt</module> --><!-- PMD voilation --> <module>spring-boot-jasypt</module>
<!-- <module>spring-custom-aop</module> --><!-- Malformed POM --> <!-- <module>spring-custom-aop</module> --><!-- Malformed POM -->
<module>spring-data-rest-querydsl</module> <module>spring-data-rest-querydsl</module>
<!-- <module>spring-groovy</module> --><!-- PMD voilation --> <module>spring-groovy</module>
<module>spring-mobile</module> <module>spring-mobile</module>
<module>spring-mustache</module> <module>spring-mustache</module>
<module>spring-mvc-simple</module> <module>spring-mvc-simple</module>
@ -1123,7 +1123,7 @@
<module>spring-roo</module> <module>spring-roo</module>
<module>spring-security-stormpath</module> <module>spring-security-stormpath</module>
<module>sse-jaxrs</module> <module>sse-jaxrs</module>
<!-- <module>static-analysis</module> --><!-- PMD voilation --> <module>static-analysis</module>
<module>stripe</module> <module>stripe</module>
<!-- <module>structurizr</module> --><!-- Artiifact not found --> <!-- <module>structurizr</module> --><!-- Artiifact not found -->
<!-- <module>Twitter4J</module> --><!-- Test failure --> <!-- <module>Twitter4J</module> --><!-- Test failure -->
@ -1134,8 +1134,8 @@
<!-- <module>graphql/graphql-java</module> --><!-- Wrong parent --> <!-- <module>graphql/graphql-java</module> --><!-- Wrong parent -->
<!-- <module>guest/deep-jsf</module> --><!-- guest post on different site --> <!-- <module>guest/deep-jsf</module> --><!-- guest post on different site -->
<!-- <module>guest/junit5-example</module> --><!-- guest post on different site - Compilation failure --> <!-- <module>guest/junit5-example</module> --><!-- guest post on different site - Compilation failure -->
<!-- <module>guest/log4j2-example</module> --><!-- PMD voilation --> <!-- <module>guest/log4j2-example</module> --><!-- guest post on different site -->
<!-- <module>guest/logback-example</module> --><!-- PMD voilation --> <!-- <module>guest/logback-example</module> --><!-- guest post on different site -->
<!-- <module>guest/memory-leaks</module> --><!-- guest post on different site --> <!-- <module>guest/memory-leaks</module> --><!-- guest post on different site -->
<!-- <module>guest/remote-debugging</module> --><!-- guest post on different site --> <!-- <module>guest/remote-debugging</module> --><!-- guest post on different site -->
<!-- <module>guest/spring-boot-app</module> --><!-- guest post on different site --> <!-- <module>guest/spring-boot-app</module> --><!-- guest post on different site -->
@ -1151,7 +1151,7 @@
<module>spring-boot-h2/spring-boot-h2-database</module> <module>spring-boot-h2/spring-boot-h2-database</module>
<!--module>spring-boot-h2/spring-boot-h2-remote-app</module--> <!--module>spring-boot-h2/spring-boot-h2-remote-app</module-->
<!-- <module>guest\webservices\rest-client</module> --><!-- guest post on different site --> <!-- <module>guest\webservices\rest-client</module> --><!-- guest post on different site -->
<!-- <module>guest\webservices\rest-server</module> --><!-- PMD voilation --> <!-- <module>guest\webservices\rest-server</module> --><!-- guest post on different site -->
<!-- <module>guest\webservices\spring-rest-service</module> --><!-- guest post on different site --> <!-- <module>guest\webservices\spring-rest-service</module> --><!-- guest post on different site -->
</modules> </modules>

View File

@ -16,16 +16,16 @@ import junit.framework.Test;
import junit.framework.TestCase; import junit.framework.TestCase;
import junit.framework.TestSuite; import junit.framework.TestSuite;
public class AppTest extends TestCase { public class AppLiveTest extends TestCase {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
public AppTest( String testName ) { public AppLiveTest( String testName ) {
super( testName ); super( testName );
} }
public static Test suite() { public static Test suite() {
return new TestSuite( AppTest.class ); return new TestSuite( AppLiveTest.class );
} }
public void testApp() throws IOException, ClassNotFoundException { public void testApp() throws IOException, ClassNotFoundException {

View File

@ -7,7 +7,7 @@ import java.io.File;
import org.junit.Test; import org.junit.Test;
import org.springframework.context.support.GenericGroovyApplicationContext; import org.springframework.context.support.GenericGroovyApplicationContext;
public class GroovyConfigurationTest { public class GroovyConfigurationUnitTest {
private static final String FILE_NAME = "GroovyBeanConfig.groovy"; private static final String FILE_NAME = "GroovyBeanConfig.groovy";
private static final String FILE_PATH = "src/main/java/com/baeldug/groovyconfig/"; private static final String FILE_PATH = "src/main/java/com/baeldug/groovyconfig/";

View File

@ -5,7 +5,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test; import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
public class JavaConfigurationTest { public class JavaConfigurationUnitTest {
@Test @Test
public void whenJavaConfig_thenCorrectPerson() { public void whenJavaConfig_thenCorrectPerson() {

View File

@ -6,7 +6,7 @@ import org.junit.Test;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
public class XmlConfigurationTest { public class XmlConfigurationUnitTest {
@Test @Test
public void whenXmlConfig_thenCorrectPerson() { public void whenXmlConfig_thenCorrectPerson() {

View File

@ -7,7 +7,7 @@ import junit.framework.TestSuite;
/** /**
* Unit test for simple App. * Unit test for simple App.
*/ */
public class AppTest public class AppUnitTest
extends TestCase extends TestCase
{ {
/** /**
@ -15,7 +15,7 @@ public class AppTest
* *
* @param testName name of the test case * @param testName name of the test case
*/ */
public AppTest( String testName ) public AppUnitTest( String testName )
{ {
super( testName ); super( testName );
} }
@ -25,7 +25,7 @@ public class AppTest
*/ */
public static Test suite() public static Test suite()
{ {
return new TestSuite( AppTest.class ); return new TestSuite( AppUnitTest.class );
} }
/** /**

View File

@ -4,7 +4,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test; import org.junit.Test;
public class CntTest { public class CntUnitTest {
private Cnt service; private Cnt service;