cleanup generated files (#1705)
* upgrade to spring boot 1.5.2 * add full update to REST API * modify ratings controller * upgrade herold * fix integration test * fix integration test * minor fix * fix integration test * fix integration test * minor cleanup * minor cleanup * remove log4j properties * use standard logbook.xml * remove log4j dependencies * remove commons-logging * merge * fix conflict * exclude commons-logging dependency * cleanup * minor fix * minor fix * fix dependency issues * Revert "fix dependency issues" This reverts commit 83bf1f9fd2e1a9a55f9cacb085669568b06b49ec. * fix dependency issues * minor fix * minor fix * minor fix * cleanup generated files
This commit is contained in:
parent
f88d40442c
commit
9f9dc8770a
|
@ -31,3 +31,5 @@ spring-openid/src/main/resources/application.properties
|
||||||
.recommenders/
|
.recommenders/
|
||||||
/spring-hibernate4/nbproject/
|
/spring-hibernate4/nbproject/
|
||||||
spring-security-openid/src/main/resources/application.properties
|
spring-security-openid/src/main/resources/application.properties
|
||||||
|
|
||||||
|
spring-all/*.log
|
||||||
|
|
|
@ -3,8 +3,10 @@ package com.baeldung.cxf.aegis;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNull;
|
import static org.junit.Assert.assertNull;
|
||||||
|
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
|
@ -90,4 +92,12 @@ public class BaeldungTest {
|
||||||
xmlReader.close();
|
xmlReader.close();
|
||||||
return courseRepo;
|
return courseRepo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void cleanup(){
|
||||||
|
File testFile = new File(fileName);
|
||||||
|
if (testFile.exists()) {
|
||||||
|
testFile.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -19,6 +19,7 @@ import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.After;
|
||||||
|
|
||||||
public class JExcelTest {
|
public class JExcelTest {
|
||||||
|
|
||||||
|
@ -53,4 +54,11 @@ public class JExcelTest {
|
||||||
.get(1));
|
.get(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void cleanup(){
|
||||||
|
File testFile = new File(fileLocation);
|
||||||
|
if (testFile.exists()) {
|
||||||
|
testFile.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -16,6 +16,7 @@ import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.After;
|
||||||
|
|
||||||
public class ExcelTest {
|
public class ExcelTest {
|
||||||
|
|
||||||
|
@ -50,4 +51,11 @@ public class ExcelTest {
|
||||||
.get(1));
|
.get(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void cleanup(){
|
||||||
|
File testFile = new File(fileLocation);
|
||||||
|
if (testFile.exists()) {
|
||||||
|
testFile.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
|
@ -135,6 +135,9 @@
|
||||||
</sources>
|
</sources>
|
||||||
<outputDirectory>${basedir}/src/main/java</outputDirectory>
|
<outputDirectory>${basedir}/src/main/java</outputDirectory>
|
||||||
<clearOutputDir>false</clearOutputDir>
|
<clearOutputDir>false</clearOutputDir>
|
||||||
|
<noGeneratedHeaderComments>true</noGeneratedHeaderComments>
|
||||||
|
<extension>true</extension>
|
||||||
|
<generateEpisode>false</generateEpisode>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
|
||||||
|
package com.baeldung.jaxb.gen;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlRegistry;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This object contains factory methods for each
|
||||||
|
* Java content interface and Java element interface
|
||||||
|
* generated in the com.baeldung.jaxb.gen package.
|
||||||
|
* <p>An ObjectFactory allows you to programatically
|
||||||
|
* construct new instances of the Java representation
|
||||||
|
* for XML content. The Java representation of XML
|
||||||
|
* content can consist of schema derived interfaces
|
||||||
|
* and classes representing the binding of schema
|
||||||
|
* type definitions, element declarations and model
|
||||||
|
* groups. Factory methods for each of these are
|
||||||
|
* provided in this class.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlRegistry
|
||||||
|
public class ObjectFactory {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.baeldung.jaxb.gen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public ObjectFactory() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link UserRequest }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public UserRequest createUserRequest() {
|
||||||
|
return new UserRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link UserResponse }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public UserResponse createUserResponse() {
|
||||||
|
return new UserResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
|
||||||
|
package com.baeldung.jaxb.gen;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for UserRequest complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="UserRequest">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
|
||||||
|
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "UserRequest", propOrder = {
|
||||||
|
"id",
|
||||||
|
"name"
|
||||||
|
})
|
||||||
|
@XmlRootElement(name = "userRequest")
|
||||||
|
public class UserRequest
|
||||||
|
implements Serializable
|
||||||
|
{
|
||||||
|
|
||||||
|
private final static long serialVersionUID = -1L;
|
||||||
|
protected int id;
|
||||||
|
@XmlElement(required = true)
|
||||||
|
protected String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the id property.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the id property.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setId(int value) {
|
||||||
|
this.id = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the name property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the name property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setName(String value) {
|
||||||
|
this.name = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,149 @@
|
||||||
|
|
||||||
|
package com.baeldung.jaxb.gen;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlSchemaType;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||||
|
import org.w3._2001.xmlschema.Adapter1;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for UserResponse complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="UserResponse">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
|
||||||
|
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="gender" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="created" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "UserResponse", propOrder = {
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"gender",
|
||||||
|
"created"
|
||||||
|
})
|
||||||
|
@XmlRootElement(name = "userResponse")
|
||||||
|
public class UserResponse
|
||||||
|
implements Serializable
|
||||||
|
{
|
||||||
|
|
||||||
|
private final static long serialVersionUID = -1L;
|
||||||
|
protected int id;
|
||||||
|
@XmlElement(required = true)
|
||||||
|
protected String name;
|
||||||
|
@XmlElement(required = true)
|
||||||
|
protected String gender;
|
||||||
|
@XmlElement(required = true, type = String.class)
|
||||||
|
@XmlJavaTypeAdapter(Adapter1 .class)
|
||||||
|
@XmlSchemaType(name = "dateTime")
|
||||||
|
protected Calendar created;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the id property.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the id property.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setId(int value) {
|
||||||
|
this.id = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the name property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the name property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setName(String value) {
|
||||||
|
this.name = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the gender property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getGender() {
|
||||||
|
return gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the gender property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setGender(String value) {
|
||||||
|
this.gender = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the created property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Calendar getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the created property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setCreated(Calendar value) {
|
||||||
|
this.created = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.baeldung.com/jaxb/gen", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
|
||||||
|
package com.baeldung.jaxb.gen;
|
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
package org.w3._2001.xmlschema;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||||
|
|
||||||
|
public class Adapter1
|
||||||
|
extends XmlAdapter<String, Calendar>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public Calendar unmarshal(String value) {
|
||||||
|
return (javax.xml.bind.DatatypeConverter.parseDateTime(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String marshal(Calendar value) {
|
||||||
|
if (value == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (javax.xml.bind.DatatypeConverter.printDateTime(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package org.baeldung.shell.simple;
|
package org.baeldung.shell.simple;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
@ -15,13 +16,18 @@ public class SimpleCLIUnitTest {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void startUp() throws InterruptedException {
|
public static void startUp() throws InterruptedException {
|
||||||
Bootstrap bootstrap = new Bootstrap();
|
final Bootstrap bootstrap = new Bootstrap();
|
||||||
shell = bootstrap.getJLineShellComponent();
|
shell = bootstrap.getJLineShellComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void shutdown() {
|
public static void shutdown() {
|
||||||
shell.stop();
|
shell.stop();
|
||||||
|
// delete contents.txt
|
||||||
|
final File testFile = new File("contents.txt");
|
||||||
|
if (testFile.exists()) {
|
||||||
|
testFile.delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JLineShellComponent getShell() {
|
public static JLineShellComponent getShell() {
|
||||||
|
@ -31,7 +37,7 @@ public class SimpleCLIUnitTest {
|
||||||
@Test
|
@Test
|
||||||
public void givenCommandConfig_whenExecutingWebGetCommand_thenCorrectResult() {
|
public void givenCommandConfig_whenExecutingWebGetCommand_thenCorrectResult() {
|
||||||
|
|
||||||
CommandResult resultWebSave = shell.executeCommand("web-get --url https://www.google.com");
|
final CommandResult resultWebSave = shell.executeCommand("web-get --url https://www.google.com");
|
||||||
|
|
||||||
Assert.assertTrue(resultWebSave.isSuccess());
|
Assert.assertTrue(resultWebSave.isSuccess());
|
||||||
}
|
}
|
||||||
|
@ -40,37 +46,27 @@ public class SimpleCLIUnitTest {
|
||||||
public void givenCommandConfig_whenExecutingWebSaveCommand_thenCorrectResult() {
|
public void givenCommandConfig_whenExecutingWebSaveCommand_thenCorrectResult() {
|
||||||
|
|
||||||
shell.executeCommand("admin-enable");
|
shell.executeCommand("admin-enable");
|
||||||
CommandResult result = shell.executeCommand("web-save --url https://www.google.com --out contents.txt");
|
final CommandResult result = shell.executeCommand("web-save --url https://www.google.com --out contents.txt");
|
||||||
|
|
||||||
Assert.assertArrayEquals(
|
Assert.assertArrayEquals(new boolean[] { result.isSuccess(), new File("contents.txt").exists() }, new boolean[] { true, true });
|
||||||
new boolean[]{
|
|
||||||
result.isSuccess(),
|
|
||||||
new File("contents.txt").exists()},
|
|
||||||
new boolean[]{true, true});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenCommandConfig_whenAdminEnableCommandExecuted_thenCorrectAvailability() {
|
public void givenCommandConfig_whenAdminEnableCommandExecuted_thenCorrectAvailability() {
|
||||||
|
|
||||||
CommandResult resultAdminDisable = shell.executeCommand("admin-disable");
|
|
||||||
CommandResult resultWebSaveUnavailable = shell.executeCommand("web-save --url https://www.google.com --out contents.txt");
|
|
||||||
CommandResult resultAdminEnable = shell.executeCommand("admin-enable");
|
|
||||||
CommandResult resultWebSaveAvailable = shell.executeCommand("web-save --url https://www.google.com --out contents.txt");
|
|
||||||
|
|
||||||
Assert.assertArrayEquals(
|
final CommandResult resultAdminDisable = shell.executeCommand("admin-disable");
|
||||||
new boolean[]{
|
final CommandResult resultWebSaveUnavailable = shell.executeCommand("web-save --url https://www.google.com --out contents.txt");
|
||||||
resultAdminDisable.isSuccess(),
|
final CommandResult resultAdminEnable = shell.executeCommand("admin-enable");
|
||||||
resultWebSaveUnavailable.isSuccess(),
|
final CommandResult resultWebSaveAvailable = shell.executeCommand("web-save --url https://www.google.com --out contents.txt");
|
||||||
resultAdminEnable.isSuccess(),
|
|
||||||
resultWebSaveAvailable.isSuccess()},
|
Assert.assertArrayEquals(new boolean[] { resultAdminDisable.isSuccess(), resultWebSaveUnavailable.isSuccess(), resultAdminEnable.isSuccess(), resultWebSaveAvailable.isSuccess() }, new boolean[] { true, false, true, true });
|
||||||
new boolean[]{true, false, true, true});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenCommandConfig_whenWebSaveCommandExecutedNoOutArgument_thenError() {
|
public void givenCommandConfig_whenWebSaveCommandExecutedNoOutArgument_thenError() {
|
||||||
|
|
||||||
shell.executeCommand("admin-enable");
|
shell.executeCommand("admin-enable");
|
||||||
CommandResult resultWebSave = shell.executeCommand("web-save --url https://www.google.com");
|
final CommandResult resultWebSave = shell.executeCommand("web-save --url https://www.google.com");
|
||||||
|
|
||||||
Assert.assertEquals(resultWebSave.isSuccess(), false);
|
Assert.assertEquals(resultWebSave.isSuccess(), false);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +74,7 @@ public class SimpleCLIUnitTest {
|
||||||
@Test
|
@Test
|
||||||
public void givenCommandConfig_whenExecutingWebGetCommandWithDefaultArgument_thenCorrectResult() {
|
public void givenCommandConfig_whenExecutingWebGetCommandWithDefaultArgument_thenCorrectResult() {
|
||||||
|
|
||||||
CommandResult result = shell.executeCommand("web-get https://www.google.com");
|
final CommandResult result = shell.executeCommand("web-get https://www.google.com");
|
||||||
|
|
||||||
Assert.assertEquals(result.isSuccess(), true);
|
Assert.assertEquals(result.isSuccess(), true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue