Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Upgrade to latest version of compatibility api.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Munoz committed Jun 20, 2013
1 parent 13cc734 commit 61fd718
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
26 changes: 15 additions & 11 deletions zanata-war/pom.xml
Expand Up @@ -1138,26 +1138,30 @@

<dependency>
<groupId>org.zanata</groupId>
<artifactId>zanata-api-compat</artifactId>
<version>1.0.0</version>
<artifactId>zanata-api-1.4.4</artifactId>
<version>1.3-SNAPSHOT</version>
<scope>test</scope>
<classifier>v1.4.4</classifier>
</dependency>

<dependency>
<groupId>org.zanata</groupId>
<artifactId>zanata-api-compat</artifactId>
<version>1.0.0</version>
<scope>test</scope>
<classifier>v1.3</classifier>
<groupId>org.zanata</groupId>
<artifactId>zanata-api-1.3</artifactId>
<version>1.3-SNAPSHOT</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.zanata</groupId>
<artifactId>zanata-api-compat</artifactId>
<version>1.1</version>
<artifactId>zanata-api-1.5.0</artifactId>
<version>1.3-SNAPSHOT</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.zanata</groupId>
<artifactId>zanata-api-2.3.0</artifactId>
<version>1.3-SNAPSHOT</version>
<scope>test</scope>
<classifier>v1.5.0</classifier>
</dependency>

<!-- GWT Dependencies -->
Expand Down
Expand Up @@ -83,7 +83,7 @@ public void postResource() throws Exception

ITranslationResources translationsClient = super.createProxy( createClientProxyFactory(ADMIN, ADMIN_KEY),
ITranslationResources.class, "/projects/p/sample-project/iterations/i/1.0/r/");
ClientResponse<String> response = translationsClient.post(res, new StringSet(PoHeader.ID + ";" + SimpleComment.ID));
ClientResponse<String> response = translationsClient.post(res, new StringSet(PoHeader.ID + ";" + SimpleComment.ID), true);

assertThat( response.getStatus(), is(Status.CREATED.getStatusCode()) ); // 201
response.releaseConnection();
Expand Down Expand Up @@ -130,13 +130,13 @@ public void doublePostResource() throws Exception
// Post once
ITranslationResources translationsClient = super.createProxy( createClientProxyFactory(ADMIN, ADMIN_KEY),
ITranslationResources.class, "/projects/p/sample-project/iterations/i/1.0/r/");
ClientResponse<String> response = translationsClient.post(res, new StringSet(PoHeader.ID + ";" + SimpleComment.ID));
ClientResponse<String> response = translationsClient.post(res, new StringSet(PoHeader.ID + ";" + SimpleComment.ID), true);

assertThat( response.getStatus(), is(Status.CREATED.getStatusCode()) ); // 201
response.releaseConnection();

// Post Twice (should conflict)
response = translationsClient.post(res, new StringSet(PoHeader.ID + ";" + SimpleComment.ID));
response = translationsClient.post(res, new StringSet(PoHeader.ID + ";" + SimpleComment.ID), true);

assertThat(response.getStatus(), is(Status.CONFLICT.getStatusCode())); // 409
response.releaseConnection();
Expand Down
Expand Up @@ -23,7 +23,7 @@
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.junit.Test;
import org.zanata.RestTest;
import org.zanata.v1_5_0.rest.client.IVersion;
import org.zanata.v1_5_0.rest.client.IVersionResource;
import org.zanata.v1_5_0.rest.dto.VersionInfo;

import static org.hamcrest.MatcherAssert.assertThat;
Expand All @@ -41,9 +41,9 @@ protected void prepareDBUnitOperations()
@RunAsClient
public void getVersionXml()
{
IVersion versionClient = super.createProxy(createClientProxyFactory(TRANSLATOR, TRANSLATOR_KEY),
IVersion.class, "/version");
VersionInfo versionInfo = versionClient.get();
IVersionResource versionClient = super.createProxy(createClientProxyFactory(TRANSLATOR, TRANSLATOR_KEY),
IVersionResource.class, "/version");
VersionInfo versionInfo = versionClient.get().getEntity();

assertThat( versionInfo.getVersionNo(), notNullValue() );
assertThat( versionInfo.getBuildTimeStamp(), notNullValue() );
Expand Down

0 comments on commit 61fd718

Please sign in to comment.