8000 #6 · soujava/soujava-test-kit@e9c8755 · GitHub
[go: up one dir, main page]

Skip to content

Commit e9c8755

Browse files
1 parent 4c06836 commit e9c8755

File tree

8 files changed

+138
-12
lines changed

8 files changed

+138
-12
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea
2-
target
2+
target
3+
*.iml

gatling/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
target
3+
*.iml

http-mock/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
target
3+
*.iml

http-mock/pom.xml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<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">
2+
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>br.org.soujava</groupId>
7+
<artifactId>scala-gatling-bootstrap-mvn</artifactId>
8+
<version>2.1.7</version>
9+
</parent>
10+
11+
<artifactId>http-mock</artifactId>
12+
<version>2.1.7</version>
13+
14+
<properties>
15+
<jackson.version>2.6.3</jackson.version>
16+
<httpcore.version>4.2.3</httpcore.version>
17+
<staxon.version>1.3</staxon.version>
18+
<jssonassert.version>1.2.3</jssonassert.version>
19+
<dozer.version>5.5.1</dozer.version>
20+
<beanutils.version>1.9.1</beanutils.version>
21+
</properties>
22+
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>com.fasterxml.jackson.core</groupId>
27+
<artifactId>jackson-core</artifactId>
28+
<version>${jackson.version}</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>com.fasterxml.jackson.core</groupId>
32+
<artifactId>jackson-databind</artifactId>
33+
<version>${jackson.version}</version>
34+
</dependency>
35+
<dependency>
36+
<groupId>com.fasterxml.jackson.core</groupId>
37+
<artifactId>jackson-annotations</artifactId>
38+
<version>${jackson.version}</version>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.apache.httpcomponents</groupId>
42+
<artifactId>httpcore</artifactId>
43+
<version>${httpcore.version}</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.apache.commons</groupId>
47+
<artifactId>commons-lang3</artifactId>
48+
<version>3.0</version>
49+
</dependency>
50+
<dependency>
51+
<groupId>commons-beanutils</groupId>
52+
<artifactId>commons-beanutils</artifactId>
53+
<version>${beanutils.version}</version>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.skyscreamer</groupId>
57+
<artifactId>jsonassert</artifactId>
58+
<version>${jssonassert.version}</version>
59+
<scope>test</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>com.github.kristofa</groupId>
63+
<artifactId>mock-http-server</artifactId>
64+
<version>4.1</version>
65+
<scope>test</scope>
66+
</dependency>
67+
<dependency>
68+
<groupId>org.testng</groupId>
69+
<artifactId>testng</artifactId>
70+
<version>${testng.version}</version>
71+
<scope>test</scope>
72+
</dependency>
73+
74+
</dependencies>
75+
76+
<build>
77+
<plugins>
78+
<!--Exclude integration tests from maven-->
79+
<plugin>
80+
<groupId>org.apache.maven.plugins</groupId>
81+
<artifactId>maven-surefire-plugin</artifactId>
82+
<configuration>
83+
<excludedGroups>integration</excludedGroups>
84+
</configuration>
85+
</plugin>
86+
<plugin>
87+
<groupId>org.codehaus.mojo</groupId>
88+
<artifactId>build-helper-maven-plugin</artifactId>
89+
<executions>
90+
<execution>
91+
<id>attach-features-xml</id>
92+
<phase>package</phase>
93+
<goals>
94+
<goal>attach-artifact</goal>
95+
</goals>
96+
<configuration>
97+
<artifacts>
98+
<artifact>
99+
<file>${basedir}/target/classes/features.xml</file>
100+
<type>xml</type>
101+
<classif F438 ier>features</classifier>
102+
</artifact>
103+
</artifacts>
104+
</configuration>
105+
</execution>
106+
</executions>
107+
</plugin>
108+
</plugins>
109+
110+
<resources>
111+
<!-- Allow filtering of maven properties -->
112+
<resource>
113+
<directory>${basedir}/src/main/resources</directory>
114+
<filtering>true</filtering>
115+
</resource>
116+
</resources>
117+
</build>
118+
119+
</project>

http-mock/MatchcraftBaseMockTest.java renamed to http-mock/src/test/java/br/org/soujava/httpmock/BaseMockTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.dtg.esb.api.matchcraft.unit.mock;
1+
package br.org.soujava.httpmock;
22

33
import com.github.kristofa.test.http.MockHttpServer;
44
import com.github.kristofa.test.http.SimpleHttpResponseProvider;
@@ -10,12 +10,10 @@
1010

1111
import static org.testng.Assert.assertTrue;
1212

13-
1413
/**
15-
* Abstract class that contains the startup and teardown methods used to create and stop mock services
1614
* @author thomasmodeneis
1715
*/
18-
public abstract class MatchcraftBaseMockTest {
16+
public abstract class BaseMockTest {
1917

2018
protected static final String UTF_8 = "UTF-8";
2119
protected static MockHttpServer server;

http-mock/MockHttpServerTest.java renamed to http-mock/src/test/java/br/org/soujava/httpmock/MockHttpServerTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.dtg.esb.api.matchcraft.unit.mock;
1+
package br.org.soujava.httpmock;
22

33
import com.github.kristofa.test.http.Method;
44
import com.github.kristofa.test.http.MockHttpServer;
@@ -20,13 +20,10 @@
2020

2121
import static org.testng.Assert.assertTrue;
2222

23-
2423
/**
25-
* Example test for MOCK http requests using MatchcraftBaseMockTest
2624
* @author thomasmodeneis
27-
*
2825
*/
29-
public class MockHttpServerTest extends MatchcraftBaseMockTest {
26+
public class MockHttpServerTest extends BaseMockTest {
3027

3128
@Test
3229
public void testShouldHandleGetRequests() throws IOException {

pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@
1111

1212
<modules>
1313
<module>webservice</module>
14+
<module>http-mock</module>
1415
<module>gatling</module>
1516
</modules>
1617

1718
<properties>
1819
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1920
<gatling.version>${project.version}</gatling.version>
2021
<gatling-plugin.version>2.1.7</gatling-plugin.version>
21-
</properties>
22+
<testng.version>6.8.5</testng.version>
23+
24+
</properties>
2225

2326
<repositories>
2427
<repository>

webservice/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
target/
1+
.idea
2+
target
3+
*.iml

0 commit comments

Comments
 (0)
0