add libraries server project
This commit is contained in:
parent
113ebc2725
commit
4aa8633c43
9
libraries-server/.gitignore
vendored
Normal file
9
libraries-server/.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
*.class
|
||||
|
||||
# Folders #
|
||||
/gensrc
|
||||
/target
|
||||
|
||||
# Packaged files #
|
||||
*.jar
|
||||
/bin/
|
19
libraries-server/pom.xml
Normal file
19
libraries-server/pom.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>libraries-server</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.paho</groupId>
|
||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
1
libraries-server/src/test/resources/ABC.txt
Normal file
1
libraries-server/src/test/resources/ABC.txt
Normal file
@ -0,0 +1 @@
|
||||
Hello World from ABC.txt!!!
|
@ -0,0 +1,4 @@
|
||||
1,2,3
|
||||
-10, 30, 20
|
||||
15, -5, 10
|
||||
-5, -10, -15
|
|
1
libraries-server/src/test/resources/aaa.txt
Normal file
1
libraries-server/src/test/resources/aaa.txt
Normal file
@ -0,0 +1 @@
|
||||
Hello World from aaa.txt!!!
|
13
libraries-server/src/test/resources/adder-beans.xml
Normal file
13
libraries-server/src/test/resources/adder-beans.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
|
||||
|
||||
<util:properties id="props">
|
||||
<prop key="adder">
|
||||
4
|
||||
</prop>
|
||||
</util:properties>
|
||||
|
||||
</beans>
|
||||
|
3
libraries-server/src/test/resources/book.csv
Normal file
3
libraries-server/src/test/resources/book.csv
Normal file
@ -0,0 +1,3 @@
|
||||
author,title
|
||||
Dan Simmons,Hyperion
|
||||
Douglas Adams,The Hitchhiker's Guide to the Galaxy
|
|
5
libraries-server/src/test/resources/csv/fourColumn.csv
Normal file
5
libraries-server/src/test/resources/csv/fourColumn.csv
Normal file
@ -0,0 +1,5 @@
|
||||
ColA,ColB,ColC,ColD
|
||||
A,B,B,B
|
||||
C,D,W,W
|
||||
G,G,E,E
|
||||
G,F,Q,Q
|
|
5
libraries-server/src/test/resources/csv/namedColumn.csv
Normal file
5
libraries-server/src/test/resources/csv/namedColumn.csv
Normal file
@ -0,0 +1,5 @@
|
||||
name,age
|
||||
adam,1000
|
||||
martin,27
|
||||
gigi,41
|
||||
seraphine,30
|
|
5
libraries-server/src/test/resources/csv/twoColumn.csv
Normal file
5
libraries-server/src/test/resources/csv/twoColumn.csv
Normal file
@ -0,0 +1,5 @@
|
||||
ColA,ColB
|
||||
A,B
|
||||
C,D
|
||||
G,G
|
||||
G,F
|
|
8
libraries-server/src/test/resources/dockerapi/Dockerfile
Normal file
8
libraries-server/src/test/resources/dockerapi/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM alpine:3.6
|
||||
|
||||
RUN apk --update add git openssh && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm /var/cache/apk/*
|
||||
|
||||
ENTRYPOINT ["git"]
|
||||
CMD ["--help"]
|
43
libraries-server/src/test/resources/employees.sql
Normal file
43
libraries-server/src/test/resources/employees.sql
Normal file
@ -0,0 +1,43 @@
|
||||
CREATE TABLE employee(
|
||||
id int NOT NULL PRIMARY KEY auto_increment,
|
||||
firstname varchar(255),
|
||||
lastname varchar(255),
|
||||
salary double,
|
||||
hireddate date
|
||||
);
|
||||
|
||||
CREATE TABLE email(
|
||||
id int NOT NULL PRIMARY KEY auto_increment,
|
||||
employeeid int,
|
||||
address varchar(255)
|
||||
);
|
||||
|
||||
CREATE TABLE employee_legacy(
|
||||
id int NOT NULL PRIMARY KEY auto_increment,
|
||||
first_name varchar(255),
|
||||
last_name varchar(255),
|
||||
salary double,
|
||||
hired_date date
|
||||
);
|
||||
|
||||
|
||||
INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('John', 'Doe', 10000.10, to_date('01-01-2001','dd-mm-yyyy'));
|
||||
INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Kevin', 'Smith', 20000.20, to_date('02-02-2002','dd-mm-yyyy'));
|
||||
INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Kim', 'Smith', 30000.30, to_date('03-03-2003','dd-mm-yyyy'));
|
||||
INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Stephen', 'Torvalds', 40000.40, to_date('04-04-2004','dd-mm-yyyy'));
|
||||
INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Christian', 'Reynolds', 50000.50, to_date('05-05-2005','dd-mm-yyyy'));
|
||||
|
||||
INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('John', 'Doe', 10000.10, to_date('01-01-2001','dd-mm-yyyy'));
|
||||
INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Kevin', 'Smith', 20000.20, to_date('02-02-2002','dd-mm-yyyy'));
|
||||
INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Kim', 'Smith', 30000.30, to_date('03-03-2003','dd-mm-yyyy'));
|
||||
INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Stephen', 'Torvalds', 40000.40, to_date('04-04-2004','dd-mm-yyyy'));
|
||||
INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Christian', 'Reynolds', 50000.50, to_date('05-05-2005','dd-mm-yyyy'));
|
||||
|
||||
INSERT INTO email (employeeid,address) VALUES (1, 'john@baeldung.com');
|
||||
INSERT INTO email (employeeid,address) VALUES (1, 'john@gmail.com');
|
||||
INSERT INTO email (employeeid,address) VALUES (2, 'kevin@baeldung.com');
|
||||
INSERT INTO email (employeeid,address) VALUES (3, 'kim@baeldung.com');
|
||||
INSERT INTO email (employeeid,address) VALUES (3, 'kim@gmail.com');
|
||||
INSERT INTO email (employeeid,address) VALUES (3, 'kim@outlook.com');
|
||||
INSERT INTO email (employeeid,address) VALUES (4, 'stephen@baeldung.com');
|
||||
INSERT INTO email (employeeid,address) VALUES (5, 'christian@gmail.com');
|
1
libraries-server/src/test/resources/fileTest.txt
Normal file
1
libraries-server/src/test/resources/fileTest.txt
Normal file
@ -0,0 +1 @@
|
||||
Hello World from fileTest.txt!!!
|
0
libraries-server/src/test/resources/ftp/baz.txt
Normal file
0
libraries-server/src/test/resources/ftp/baz.txt
Normal file
1
libraries-server/src/test/resources/input.txt
Normal file
1
libraries-server/src/test/resources/input.txt
Normal file
@ -0,0 +1 @@
|
||||
This file is merely for testing.
|
1
libraries-server/src/test/resources/output.txt
Normal file
1
libraries-server/src/test/resources/output.txt
Normal file
@ -0,0 +1 @@
|
||||
Should be copied to OutputStream.
|
2
libraries-server/src/test/resources/sample.txt
Normal file
2
libraries-server/src/test/resources/sample.txt
Normal file
@ -0,0 +1,2 @@
|
||||
line 1
|
||||
a second line
|
@ -0,0 +1,13 @@
|
||||
|
||||
Meta:
|
||||
|
||||
Narrative:
|
||||
As a user
|
||||
I want to look up a valid user's profile on github
|
||||
So that I can know the login payload should be the same as username
|
||||
|
||||
Scenario: Github user's profile should have a login payload same as username
|
||||
|
||||
Given github user profile api
|
||||
When looking for eugenp via the api
|
||||
Then github's response contains a 'login' payload same as eugenp
|
@ -0,0 +1,11 @@
|
||||
Meta:
|
||||
|
||||
Narrative:
|
||||
As user
|
||||
I want to add a number
|
||||
So that I can have the sum
|
||||
|
||||
Scenario: A user can submit a number to adder and get current sum
|
||||
Given a number
|
||||
When I submit another number 5 to adder
|
||||
Then I get a sum of the numbers
|
3
libraries-server/src/test/resources/yaml/customer.yaml
Normal file
3
libraries-server/src/test/resources/yaml/customer.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
firstName: "John"
|
||||
lastName: "Doe"
|
||||
age: 20
|
@ -0,0 +1,7 @@
|
||||
firstName: "John"
|
||||
lastName: "Doe"
|
||||
age: 31
|
||||
contactDetails:
|
||||
- { type: "mobile", number: 123456789}
|
||||
- { type: "landline", number: 456786868}
|
||||
|
@ -0,0 +1,13 @@
|
||||
firstName: "John"
|
||||
lastName: "Doe"
|
||||
age: 31
|
||||
contactDetails:
|
||||
- type: "mobile"
|
||||
number: 123456789
|
||||
- type: "landline"
|
||||
number: 456786868
|
||||
homeAddress:
|
||||
line: "Xyz, DEF Street"
|
||||
city: "City Y"
|
||||
state: "State Y"
|
||||
zip: 345657
|
@ -0,0 +1,6 @@
|
||||
firstName: "John"
|
||||
lastName: "Doe"
|
||||
age: 31
|
||||
contactDetails:
|
||||
- !contact { type: "mobile", number: 123456789}
|
||||
- !contact { type: "landline", number: 456786868}
|
@ -0,0 +1,4 @@
|
||||
!!com.baeldung.snakeyaml.Customer
|
||||
firstName: "John"
|
||||
lastName: "Doe"
|
||||
age: 20
|
8
libraries-server/src/test/resources/yaml/customers.yaml
Normal file
8
libraries-server/src/test/resources/yaml/customers.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
firstName: "John"
|
||||
lastName: "Doe"
|
||||
age: 20
|
||||
---
|
||||
firstName: "Jack"
|
||||
lastName: "Jones"
|
||||
age: 25
|
@ -778,13 +778,6 @@
|
||||
<version>${snakeyaml.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.paho</groupId>
|
||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
|
Loading…
x
Reference in New Issue
Block a user