Skip to content

Commit f4a063e

Browse files
committed
Merge pull request #32 from appirio-tech/dev
merging from dev to qa
2 parents 31eb29f + 3bd32ad commit f4a063e

File tree

15 files changed

+1156
-4
lines changed

15 files changed

+1156
-4
lines changed

api.tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target/

api.tests/pom.xml

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
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+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>com.appirio.api.review.tests</groupId>
4+
<artifactId>automation.api.review.tests</artifactId>
5+
<version>0.0.1-SNAPSHOT</version>
6+
<packaging>jar</packaging>
7+
8+
<name>automation.api.review.tests</name>
9+
<url>http://maven.apache.org</url>
10+
<properties>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
</properties>
13+
14+
<dependencies>
15+
<dependency>
16+
<groupId>com.appirio.automation.api</groupId>
17+
18+
<artifactId>automation-api</artifactId>
19+
<version>0.0.1</version>
20+
</dependency>
21+
<dependency>
22+
<groupId>org.apache.httpcomponents</groupId>
23+
<artifactId>httpclient</artifactId>
24+
<version>4.4.1</version>
25+
</dependency>
26+
<dependency>
27+
<groupId>commons-configuration</groupId>
28+
<artifactId>commons-configuration</artifactId>
29+
<version>1.9</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.json</groupId>
33+
<artifactId>json</artifactId>
34+
<version>20140107</version>
35+
</dependency>
36+
37+
38+
<dependency>
39+
<groupId>org.testng</groupId>
40+
<artifactId>testng</artifactId>
41+
<version>6.8.21</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>log4j</groupId>
45+
<artifactId>log4j</artifactId>
46+
<version>1.2.17</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>com.fasterxml.jackson.core</groupId>
50+
<artifactId>jackson-databind</artifactId>
51+
<version>2.2.3</version>
52+
</dependency>
53+
</dependencies>
54+
<build>
55+
<plugins>
56+
<plugin>
57+
<groupId>org.jacoco</groupId>
58+
<artifactId>jacoco-maven-plugin</artifactId>
59+
<version>0.7.4.201502262128</version>
60+
<configuration>
61+
<destfile>${basedir}/target/jacoco.exec</destfile>
62+
<!-- <datafile>${basedir}/target/jacoco-unit.exec</datafile> -->
63+
</configuration>
64+
<executions>
65+
<execution>
66+
<id>jacoco-initialize</id>
67+
<goals>
68+
<goal>prepare-agent</goal>
69+
</goals>
70+
</execution>
71+
<execution>
72+
<id>jacoco-site</id>
73+
<phase>test</phase>
74+
<goals>
75+
<goal>report</goal>
76+
</goals>
77+
</execution>
78+
</executions>
79+
80+
</plugin>
81+
<plugin>
82+
<groupId>org.testng.xslt</groupId>
83+
<artifactId>testng-xslt-plugin</artifactId>
84+
<version>1.1</version>
85+
<configuration>
86+
<showRuntimeTotals>true</showRuntimeTotals>
87+
<sortTestCaseLinks>true</sortTestCaseLinks>
88+
<testDetailsFilter>FAIL,PASS,SKIP,CONF</testDetailsFilter>
89+
</configuration>
90+
</plugin>
91+
<plugin>
92+
<groupId>org.apache.maven.plugins</groupId>
93+
<artifactId>maven-resources-plugin</artifactId>
94+
<version>2.7</version>
95+
<configuration>
96+
<systemPropertyVariables>
97+
<java.awt.headless>true</java.awt.headless>
98+
</systemPropertyVariables>
99+
<encoding>UTF-8</encoding>
100+
</configuration>
101+
</plugin>
102+
103+
<plugin>
104+
<groupId>org.apache.maven.plugins</groupId>
105+
<artifactId>maven-compiler-plugin</artifactId>
106+
<version>3.1</version>
107+
<configuration>
108+
<source>1.7</source>
109+
<target>1.7</target>
110+
</configuration>
111+
</plugin>
112+
113+
<plugin>
114+
<groupId>com.google.code.maven-replacer-plugin</groupId>
115+
<artifactId>replacer</artifactId>
116+
<version>1.5.3</version>
117+
<executions>
118+
<execution>
119+
<phase>generate-test-sources</phase>
120+
<goals>
121+
<goal>replace</goal>
122+
</goals>
123+
</execution>
124+
</executions>
125+
<configuration>
126+
<includes>
127+
<include>${basedir}/target/**/*.properties</include>
128+
</includes>
129+
<tokenValueMap>${basedir}/token.properties</tokenValueMap>
130+
</configuration>
131+
</plugin>
132+
133+
134+
<plugin>
135+
<artifactId>maven-surefire-plugin</artifactId>
136+
<version>2.18.1</version>
137+
<configuration>
138+
<suiteXmlFiles>
139+
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
140+
</suiteXmlFiles>
141+
142+
</configuration>
143+
</plugin>
144+
</plugins>
145+
<pluginManagement>
146+
<plugins>
147+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
148+
<plugin>
149+
<groupId>org.eclipse.m2e</groupId>
150+
<artifactId>lifecycle-mapping</artifactId>
151+
<version>1.0.0</version>
152+
<configuration>
153+
<lifecycleMappingMetadata>
154+
<pluginExecutions>
155+
<pluginExecution>
156+
<pluginExecutionFilter>
157+
<groupId>org.jacoco</groupId>
158+
<artifactId>
159+
jacoco-maven-plugin
160+
</artifactId>
161+
<versionRange>
162+
[0.7.4.201502262128,)
163+
</versionRange>
164+
<goals>
165+
<goal>prepare-agent</goal>
166+
</goals>
167+
</pluginExecutionFilter>
168+
<action>
169+
<ignore></ignore>
170+
</action>
171+
</pluginExecution>
172+
</pluginExecutions>
173+
</lifecycleMappingMetadata>
174+
</configuration>
175+
</plugin>
176+
</plugins>
177+
</pluginManagement>
178+
</build>
179+
</project>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package com.appirio.api.review.config;
2+
3+
import org.apache.commons.configuration.PropertiesConfiguration;
4+
5+
import com.appirio.automation.api.config.Configuration;
6+
7+
8+
9+
public class ReviewConfiguration extends Configuration{
10+
private static final String REVIEW_RETRIEVEREVIEWITEMS = "retrieveReviewItems";
11+
private static final String REVIEW_ASSIGNNEXTREVIEW = "assignNextReview";
12+
private static final String REVIEW_CREATEREVIEWITEMS = "createReviewItems";
13+
private static final String REVIEW_UPDATEREVIEWITEMS = "updateReviewItems";
14+
private static final String PROPS_REVIEW = "review.properties";
15+
16+
private static PropertiesConfiguration reviewPropertyConfig = null;
17+
18+
private static ReviewConfiguration reviewConfiguration = null;
19+
20+
private ReviewConfiguration() {
21+
}
22+
23+
public static ReviewConfiguration initialize() {
24+
if(reviewConfiguration == null) {
25+
reviewConfiguration = new ReviewConfiguration();
26+
reviewPropertyConfig = reviewConfiguration.loadConfiguration(PROPS_REVIEW);
27+
}
28+
return reviewConfiguration;
29+
}
30+
31+
public static String getRetrieveReviewItemsEndPoint() {
32+
return getValue(reviewPropertyConfig, REVIEW_RETRIEVEREVIEWITEMS);
33+
}
34+
35+
public static String getAssignNextReviewEndPoint() {
36+
return getValue(reviewPropertyConfig, REVIEW_ASSIGNNEXTREVIEW);
37+
}
38+
39+
public static String getCreateReviewItemsEndPoint() {
40+
return getValue(reviewPropertyConfig, REVIEW_CREATEREVIEWITEMS);
41+
}
42+
43+
public static String getUpdateReviewItemsEndPoint() {
44+
return getValue(reviewPropertyConfig, REVIEW_UPDATEREVIEWITEMS);
45+
}
46+
47+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package com.appirio.api.review.model;
2+
3+
public class User {
4+
5+
private String userId ;
6+
private String username;
7+
private String password;
8+
9+
public User(String userId, String userName, String pass) {
10+
this.userId = userId;
11+
this.username = userName;
12+
this.password = pass;
13+
}
14+
15+
/**
16+
* @return the userId
17+
*/
18+
public String getUserId() {
19+
return userId;
20+
}
21+
22+
/**
23+
* @param userId the userId to set
24+
*/
25+
public void setUserId(String userId) {
26+
this.userId = userId;
27+
}
28+
29+
/**
30+
* @return the username
31+
*/
32+
public String getUsername() {
33+
return username;
34+
}
35+
36+
/**
37+
* @param username the username to set
38+
*/
39+
public void setUsername(String username) {
40+
this.username = username;
41+
}
42+
43+
/**
44+
* @return the password
45+
*/
46+
public String getPassword() {
47+
return password;
48+
}
49+
50+
/**
51+
* @param password the password to set
52+
*/
53+
public void setPassword(String password) {
54+
this.password = password;
55+
}
56+
57+
}

0 commit comments

Comments
 (0)