Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api.tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
179 changes: 179 additions & 0 deletions api.tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<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.appirio.api.review.tests</groupId>
<artifactId>automation.api.review.tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>automation.api.review.tests</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>com.appirio.automation.api</groupId>

<artifactId>automation-api</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4.1</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>


<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.21</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.2.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.4.201502262128</version>
<configuration>
<destfile>${basedir}/target/jacoco.exec</destfile>
<!-- <datafile>${basedir}/target/jacoco-unit.exec</datafile> -->
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>

</plugin>
<plugin>
<groupId>org.testng.xslt</groupId>
<artifactId>testng-xslt-plugin</artifactId>
<version>1.1</version>
<configuration>
<showRuntimeTotals>true</showRuntimeTotals>
<sortTestCaseLinks>true</sortTestCaseLinks>
<testDetailsFilter>FAIL,PASS,SKIP,CONF</testDetailsFilter>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<configuration>
<systemPropertyVariables>
<java.awt.headless>true</java.awt.headless>
</systemPropertyVariables>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>

<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<phase>generate-test-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${basedir}/target/**/*.properties</include>
</includes>
<tokenValueMap>${basedir}/token.properties</tokenValueMap>
</configuration>
</plugin>


<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>

</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jacoco</groupId>
<artifactId>
jacoco-maven-plugin
</artifactId>
<versionRange>
[0.7.4.201502262128,)
</versionRange>
<goals>
<goal>prepare-agent</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.appirio.api.review.config;

import org.apache.commons.configuration.PropertiesConfiguration;

import com.appirio.automation.api.config.Configuration;



public class ReviewConfiguration extends Configuration{
private static final String REVIEW_RETRIEVEREVIEWITEMS = "retrieveReviewItems";
private static final String REVIEW_ASSIGNNEXTREVIEW = "assignNextReview";
private static final String REVIEW_CREATEREVIEWITEMS = "createReviewItems";
private static final String REVIEW_UPDATEREVIEWITEMS = "updateReviewItems";
private static final String PROPS_REVIEW = "review.properties";

private static PropertiesConfiguration reviewPropertyConfig = null;

private static ReviewConfiguration reviewConfiguration = null;

private ReviewConfiguration() {
}

public static ReviewConfiguration initialize() {
if(reviewConfiguration == null) {
reviewConfiguration = new ReviewConfiguration();
reviewPropertyConfig = reviewConfiguration.loadConfiguration(PROPS_REVIEW);
}
return reviewConfiguration;
}

public static String getRetrieveReviewItemsEndPoint() {
return getValue(reviewPropertyConfig, REVIEW_RETRIEVEREVIEWITEMS);
}

public static String getAssignNextReviewEndPoint() {
return getValue(reviewPropertyConfig, REVIEW_ASSIGNNEXTREVIEW);
}

public static String getCreateReviewItemsEndPoint() {
return getValue(reviewPropertyConfig, REVIEW_CREATEREVIEWITEMS);
}

public static String getUpdateReviewItemsEndPoint() {
return getValue(reviewPropertyConfig, REVIEW_UPDATEREVIEWITEMS);
}

}
57 changes: 57 additions & 0 deletions api.tests/src/main/java/com/appirio/api/review/model/User.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.appirio.api.review.model;

public class User {

private String userId ;
private String username;
private String password;

public User(String userId, String userName, String pass) {
this.userId = userId;
this.username = userName;
this.password = pass;
}

/**
* @return the userId
*/
public String getUserId() {
return userId;
}

/**
* @param userId the userId to set
*/
public void setUserId(String userId) {
this.userId = userId;
}

/**
* @return the username
*/
public String getUsername() {
return username;
}

/**
* @param username the username to set
*/
public void setUsername(String username) {
this.username = username;
}

/**
* @return the password
*/
public String getPassword() {
return password;
}

/**
* @param password the password to set
*/
public void setPassword(String password) {
this.password = password;
}

}
Loading