Commit f3646962 authored by Matija Obreza's avatar Matija Obreza

GLIS DOI pattern updated with checksum and Integrated GLIS XML integration protocol (ManagerAPI)

parent ac78d449
......@@ -152,27 +152,33 @@ Anonymous calls are subject stricter rate limits than authenticated calls.
All URIs are relative to _<https://glistest.planttreaty.org>_
Class | Method | HTTP request | Description
---------- | ----------------------------------------------------------- | -------------------------- | -----------------------------------
_QueryApi_ | [**listRelationships**](docs/QueryApi.md#listRelationships) | **GET** /glisapi/v1/rels | Get PGRFA relationships
_QueryApi_ | [**listTerms**](docs/QueryApi.md#listTerms) | **GET** /glisapi/v1/terms | GLIS vocabularies
_QueryApi_ | [**search**](docs/QueryApi.md#search) | **GET** /glisapi/v1/pgrfas | Find passport data on PGRFA in GLIS
Class | Method | HTTP request | Description
------------ | ----------------------------------------------------------- | --------------------------------- | ---------------------------------------------------------------
_ManagerApi_ | [**registerPGRFA**](docs/ManagerApi.md#registerPGRFA) | **POST** /glis/xml/manager | Register PGRFA in GLIS and (potentially) obtain GLIS-minted DOI
_ManagerApi_ | [**updatePGRFA**](docs/ManagerApi.md#updatePGRFA) | **POST** /glis/xml/manager/update | Update PGRFA in GLIS
_QueryApi_ | [**listRelationships**](docs/QueryApi.md#listRelationships) | **GET** /glisapi/v1/rels | Get PGRFA relationships
_QueryApi_ | [**listTerms**](docs/QueryApi.md#listTerms) | **GET** /glisapi/v1/terms | GLIS vocabularies
_QueryApi_ | [**search**](docs/QueryApi.md#search) | **GET** /glisapi/v1/pgrfas | Find passport data on PGRFA in GLIS
## Documentation for Models
- [Actor](docs/Actor.md)
- [ApiError](docs/ApiError.md)
- [Location](docs/Location.md)
- [BasePGRFA](docs/BasePGRFA.md)
- [Names](docs/Names.md)
- [OtherIdentifier](docs/OtherIdentifier.md)
- [PGRFA](docs/PGRFA.md)
- [RateLimitError](docs/RateLimitError.md)
- [RegistrationResponse](docs/RegistrationResponse.md)
- [Relationship](docs/Relationship.md)
- [Species](docs/Species.md)
- [Target](docs/Target.md)
- [Term](docs/Term.md)
- [TermValue](docs/TermValue.md)
- [UpdateInformation](docs/UpdateInformation.md)
- [GLISUpdate](docs/GLISUpdate.md)
- [Location](docs/Location.md)
- [Registration](docs/Registration.md)
## Recommendation
......
# BasePGRFA
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **String** | | [optional]
**password** | **String** | | [optional]
**sampledoi** | [**UUID**](UUID.md) | A Digital Object Identifier (DOI) obtained from a service other than GLIS and that is already assigned to the PGRFA. | [optional]
**sampleid** | **String** | | [optional]
**location** | [**Location**](Location.md) | | [optional]
**date** | **String** | Date in which PGRFA became part of the collection. Date fragments (YYYY-MM and YYYY) are also accepted. | [optional]
**genus** | **String** | | [optional]
**cropname** | **String** | | [optional]
**species** | **String** | | [optional]
**spauth** | **String** | | [optional]
**subtaxa** | **String** | | [optional]
**stauth** | **String** | | [optional]
**method** | **String** | | [optional]
**biostatus** | **Integer** | | [optional]
**mlsstatus** | **Integer** | | [optional]
# GLISUpdate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **String** | | [optional]
**password** | **String** | | [optional]
**sampledoi** | [**UUID**](UUID.md) | A Digital Object Identifier (DOI) obtained from a service other than GLIS and that is already assigned to the PGRFA. | [optional]
**sampleid** | **String** | | [optional]
**location** | [**Location**](Location.md) | | [optional]
**date** | **String** | Date in which PGRFA became part of the collection. Date fragments (YYYY-MM and YYYY) are also accepted. | [optional]
**genus** | **String** | | [optional]
**cropname** | **String** | | [optional]
**species** | **String** | | [optional]
**spauth** | **String** | | [optional]
**subtaxa** | **String** | | [optional]
**stauth** | **String** | | [optional]
**method** | **String** | | [optional]
**biostatus** | **Integer** | | [optional]
**mlsstatus** | **Integer** | | [optional]
# ManagerApi
All URIs are relative to *https://glistest.planttreaty.org*
Method | HTTP request | Description
------------- | ------------- | -------------
[**registerPGRFA**](ManagerApi.md#registerPGRFA) | **POST** /glis/xml/manager | Register PGRFA in GLIS and (potentially) obtain GLIS-minted DOI
[**updatePGRFA**](ManagerApi.md#updatePGRFA) | **POST** /glis/xml/manager/update | Update PGRFA in GLIS
<a name="registerPGRFA"></a>
# **registerPGRFA**
> RegistrationResponse registerPGRFA(pgrfa)
Register PGRFA in GLIS and (potentially) obtain GLIS-minted DOI
The purpose of this transaction is to obtain a DOI associated to the PGRFA by providing a set of descriptors in the registration request. However, if a DOI obtained through a service other than GLIS is already associated to the PGRFA, it must be provided in the request so that GLIS will not assign a new DOI but just adopt the one provided.
### Example
```java
// Import classes:
//import org.genesys.glis.v1.invoker.ApiException;
//import org.genesys.glis.v1.api.ManagerApi;
ManagerApi apiInstance = new ManagerApi();
Registration pgrfa = new Registration(); // Registration | Register PGRFA in GLIS and obtain GLIS DOI.
try {
RegistrationResponse result = apiInstance.registerPGRFA(pgrfa);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ManagerApi#registerPGRFA");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pgrfa** | [**Registration**](Registration.md)| Register PGRFA in GLIS and obtain GLIS DOI. | [optional]
### Return type
[**RegistrationResponse**](RegistrationResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/xml
- **Accept**: application/xml
<a name="updatePGRFA"></a>
# **updatePGRFA**
> RegistrationResponse updatePGRFA(pgrfa)
Update PGRFA in GLIS
Update information on PGRFA already registered in GLIS.
### Example
```java
// Import classes:
//import org.genesys.glis.v1.invoker.ApiException;
//import org.genesys.glis.v1.api.ManagerApi;
ManagerApi apiInstance = new ManagerApi();
GLISUpdate pgrfa = new GLISUpdate(); // GLISUpdate | Update PGRFA in GLIS by DOI.
try {
RegistrationResponse result = apiInstance.updatePGRFA(pgrfa);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ManagerApi#updatePGRFA");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pgrfa** | [**GLISUpdate**](GLISUpdate.md)| Update PGRFA in GLIS by DOI. | [optional]
### Return type
[**RegistrationResponse**](RegistrationResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/xml
- **Accept**: application/xml
# Registration
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **String** | | [optional]
**password** | **String** | | [optional]
**sampledoi** | [**UUID**](UUID.md) | A Digital Object Identifier (DOI) obtained from a service other than GLIS and that is already assigned to the PGRFA. | [optional]
**sampleid** | **String** | | [optional]
**location** | [**Location**](Location.md) | | [optional]
**date** | **String** | Date in which PGRFA became part of the collection. Date fragments (YYYY-MM and YYYY) are also accepted. | [optional]
**genus** | **String** | | [optional]
**cropname** | **String** | | [optional]
**species** | **String** | | [optional]
**spauth** | **String** | | [optional]
**subtaxa** | **String** | | [optional]
**stauth** | **String** | | [optional]
**method** | **String** | | [optional]
**biostatus** | **Integer** | | [optional]
**mlsstatus** | **Integer** | | [optional]
# RegistrationResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sampleid** | **String** | The local sample identifier sent in the request. |
**genus** | **String** | Genus of the PGRFA. | [optional]
**doi** | **String** | The DOI associated with the PGRFA upon registration. | [optional]
**error** | **List&lt;String&gt;** | | [optional]
......@@ -15,8 +15,9 @@
<swagger-codegen.language>java</swagger-codegen.language>
<swagger-codegen.library>jersey2</swagger-codegen.library>
<org.slf4j.version>1.7.25</org.slf4j.version>
<jersey-version>2.22.2</jersey-version>
<jackson-version>2.7.5</jackson-version>
<jackson-version>2.7.5</jackson-version>
</properties>
<dependencies>
......@@ -27,55 +28,62 @@
</dependency>
<!-- HTTP client: jersey-client -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey-version}</version>
</dependency>
<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${jodatime-version}</version>
</dependency>
<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${jodatime-version}</version>
</dependency>
<!-- XML processing: Jackson -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson-version}</version>
</dependency>
<!-- Base64 encoding that works in both JVM and Android -->
<dependency>
<groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId>
<version>2.2</version>
</dependency>
<!-- Base64 encoding that works in both JVM and Android -->
<dependency>
<groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId>
<version>2.2</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
......@@ -89,6 +97,31 @@
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
<version>${jersey-version}</version>
</dependency>
<!-- test logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
......
......@@ -22,13 +22,16 @@ import org.junit.BeforeClass;
public abstract class BaseApiTest {
public static final String THE_DOI = "10.0155/1";
public static final String GLIS_DOI_PATTERN = "^(doi:)?10\\.[0-9]+\\/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]+[0123456789ABCDEFGHJKMNPQRSTVWXYZ~\\*\\$=U]$";
public static final String THE_DOI = "10.0155/11";
protected static String GLIS_USERNAME = System.getenv("GLIS_USERNAME");
protected static String GLIS_PASSWORD = System.getenv("GLIS_PASSWORD");
protected static ApiClient defaultClient;
protected final QueryApi queryApi = new QueryApi(defaultClient);
@BeforeClass
public static void config() {
defaultClient = new ApiClient();
......@@ -41,4 +44,5 @@ public abstract class BaseApiTest {
System.out.println("Using GLIS username " + easySmtaAuth.getUsername());
easySmtaAuth.setPassword(GLIS_PASSWORD);
}
}
......@@ -35,8 +35,6 @@ import org.junit.Test;
*/
public class QueryApiTest extends BaseApiTest {
private final QueryApi api = new QueryApi(defaultClient);
/**
* Get PGRFA relationships
*
......@@ -48,10 +46,10 @@ public class QueryApiTest extends BaseApiTest {
public void listRelationshipsTest() throws ApiException {
String role = null;
String oper = null;
List<Relationship> response = api.listRelationships(THE_DOI, role, oper);
List<Relationship> response = queryApi.listRelationships(THE_DOI, role, oper);
// GLIS test environment is occasionally cleaned
// assertThat(response.size(), greaterThan(0));
assertThat(response.size(), greaterThan(0));
}
/**
......@@ -65,7 +63,7 @@ public class QueryApiTest extends BaseApiTest {
@Test
public void listTermsTest() throws ApiException {
List<String> acceptLanguage = Arrays.asList("en");
List<Term> response = api.listTerms(acceptLanguage);
List<Term> response = queryApi.listTerms(acceptLanguage);
assertThat(response.size(), greaterThan(0));
}
......@@ -106,7 +104,7 @@ public class QueryApiTest extends BaseApiTest {
String biostatus = null;
String mlsstatus = null;
String targetkw = null;
List<PGRFA> response = api.search(page, perPage, null, THE_DOI, identifier, genus, species, name, holdwiews, holdpid, holdname, holdcountry, methodcode, provwiews, provpid, provname,
List<PGRFA> response = queryApi.search(page, perPage, null, THE_DOI, identifier, genus, species, name, holdwiews, holdpid, holdname, holdcountry, methodcode, provwiews, provpid, provname,
provcountry, provenance, collwiews, collpid, collname, collcountry, bredwiews, bredpid, bredname, bredcountry, biostatus, mlsstatus, targetkw);
// assertThat(response.size(), greaterThan(0));
......@@ -124,7 +122,7 @@ public class QueryApiTest extends BaseApiTest {
public void listDOIHolders() throws ApiException {
DOIArray dois=new DOIArray();
dois.addDoisItem(THE_DOI);
List<DOIHolder> response = api.listHolders(dois);
List<DOIHolder> response = queryApi.listHolders(dois);
// GLIS test environment is occasionally cleaned
// assertThat(response.size(), greaterThan(0));
......
/*
* Copyright 2017 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.glis.v1.api;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.genesys.glis.v1.invoker.ApiException;
import org.genesys.glis.v1.model.Location;
import org.genesys.glis.v1.model.Registration;
import org.genesys.glis.v1.model.RegistrationResponse;
import org.genesys.glis.v1.model.Relationship;
import org.junit.Test;
/**
* API tests for ManagerApi
*/
public class RegistrationApiTest extends BaseApiTest {
private final ManagerApi api = new ManagerApi(defaultClient);
/**
* Register PGRFA in GLIS
*
* @throws ApiException if the Api call fails
*/
@Test
public void registerPGRFA() throws ApiException {
Registration pgrfa = makePGRFA("Matija", "Matija ");
RegistrationResponse response = api.registerPGRFA(pgrfa);
assertThat(response.getError(), is(nullValue()));
assertThat(response.getSampleid(), is(pgrfa.getSampleid()));
assertThat(response.getGenus(), is(pgrfa.getGenus()));
assertThat(response.getDoi(), not(nullValue()));
assertTrue("GLIS did not return a valid DOI", response.getDoi().matches(GLIS_DOI_PATTERN));
}
public Registration makePGRFA(String cropName, String prefix) {
Registration pgrfa = new Registration();
pgrfa.setUsername(GLIS_USERNAME);
pgrfa.setPassword(GLIS_PASSWORD);
SimpleDateFormat df = new SimpleDateFormat("YYYY-MM-dd");
pgrfa.setDate(df.format(new Date()));
pgrfa.setCropname(cropName);
pgrfa.setSampleid(prefix + System.currentTimeMillis());
pgrfa.setMethod("obna");
Location location = new Location();
location.setWiews("NLD037");
pgrfa.setLocation(location);
return pgrfa;
}
@Test
public void relsTest() throws ApiException {
Registration pgrfa1 = makePGRFA("Matija", "Matija ");
RegistrationResponse response1 = api.registerPGRFA(pgrfa1);
assertThat(response1.getDoi(), not(nullValue()));
Registration pgrfa2 = makePGRFA("Matija", "Matija ").method("acqu");
pgrfa2.addProgdoiItem(response1.getDoi()).addProgdoiItem(response1.getDoi());
RegistrationResponse response2 = api.registerPGRFA(pgrfa2);
assertThat(response2.getDoi(), not(nullValue()));
List<Relationship> rels = queryApi.listRelationships(response1.getDoi(), null, null);
assertThat(rels.size(), greaterThan(0));
}
}
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.target=System.out
log4j.appender.stdout.encoding=UTF-8
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %t %5p %c{1}:%L - %m%n
### set log levels - for more verbose logging change 'info' to 'debug' ###
log4j.rootLogger=info, stdout
log4j.logger.httpclient.wire=DEBUG
log4j.logger.org.glassfish.jersey=DEBUG
......@@ -17,20 +17,21 @@
package org.genesys.glis.v1.api;
import org.genesys.glis.v1.invoker.ApiClient;
import org.genesys.glis.v1.invoker.Configuration;
import org.genesys.glis.v1.invoker.auth.HttpBasicAuth;
import org.junit.BeforeClass;
public abstract class BaseApiTest {
public static final String THE_DOI = "10.0155/1";
public static final String THE_DOI = "10.0155/11";
protected static String GLIS_USERNAME = System.getenv("GLIS_USERNAME");
protected static String GLIS_PASSWORD = System.getenv("GLIS_PASSWORD");
protected static ApiClient defaultClient;
@BeforeClass
public static void config() {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient = new ApiClient();
if ("true".equals(System.getenv("GLIS_DEBUG"))) {
defaultClient.setDebugging(true);
}
......
......@@ -33,7 +33,7 @@ import org.junit.Test;
*/
public class QueryApiTest extends BaseApiTest {
private final QueryApi api = new QueryApi();
private final QueryApi api = new QueryApi(defaultClient);
/**
* Find passport data on PGRFA in GLIS
......@@ -46,7 +46,7 @@ public class QueryApiTest extends BaseApiTest {
public void findPgrfaTest() throws ApiException {
List<PGRFA> response = api.search(null, null, null, THE_DOI, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null);
// assertThat(response.size(), greaterThan(0));
assertThat(response.size(), greaterThan(0));
}
/**
......
/*
* Copyright 2017 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.glis.v1.api;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import org.genesys.glis.v1.invoker.ApiException;
import org.genesys.glis.v1.model.Registration;
import org.genesys.glis.v1.model.RegistrationResponse;
import org.junit.Ignore;
import org.junit.Test;
/**
* API tests for ManagerApi
*/
public class RegistrationApiTest extends BaseApiTest {
private final ManagerApi api = new ManagerApi(defaultClient);
/**
* Register PGRFA in GLIS
* FIXME TODO https://github.com/swagger-api/swagger-codegen/issues/3870
* @throws ApiException if the Api call fails
*/
@Test
@Ignore("https://github.com/swagger-api/swagger-codegen/issues/3870")
public void registerPGRFA() throws ApiException {
Registration pgrfa= new Registration();
pgrfa.setUsername(GLIS_USERNAME);
pgrfa.setPassword(GLIS_PASSWORD);
RegistrationResponse response = api.registerPGRFA(pgrfa);
assertThat(response.getError(), hasSize(0));
assertThat(response.getSampleid(), is(pgrfa.getSampleid()));
assertThat(response.getGenus(), is(pgrfa.getGenus()));
}
}
......@@ -31,6 +31,7 @@
<invokerPackage>org.genesys.glis.v1.invoker</invokerPackage>
<output>${generated-sources-path}</output>
<configOptions>
<withXml>true</withXml>
<sourceFolder>${generated-sources-java-path}</sourceFolder>
<groupId>org.genesys</groupId>
<artifactId>glis-client-${swagger-codegen.library}</artifactId>
......
......@@ -53,6 +53,14 @@
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
</dependency>
<!-- XML processing: Jackson -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
......
......@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
public abstract class BaseApiTest {
public static final String THE_DOI = "10.0155/1";
public static final String THE_DOI = "10.0155/11";
protected static String GLIS_USERNAME = System.getenv("GLIS_USERNAME");
protected static String GLIS_PASSWORD = System.getenv("GLIS_PASSWORD");
......
/*
* Copyright 2017 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.glis.v1.api;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import org.genesys.glis.v1.invoker.ApiException;
import org.genesys.glis.v1.model.Registration;
import org.genesys.glis.v1.model.RegistrationResponse;
import org.junit.Ignore;
import org.junit.Test;
/**
* API tests for ManagerApi
*/
public class RegistrationApiTest extends BaseApiTest {