Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Java Client API
Commits
ed48f4ac
Commit
ed48f4ac
authored
Apr 08, 2019
by
Matija Obreza
Browse files
Code cleanup
- Copyright header updated - Removed unused variables
parent
034bbb7c
Changes
23
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/client/oauth/GenesysApiException.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/GenesysClient.java
View file @
ed48f4ac
/*
* Copyright 201
8
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/GenesysTokens.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/HttpConstants.java
View file @
ed48f4ac
/*
* Copyright 2019 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.genesys2.client.oauth
;
public
class
HttpConstants
{
...
...
src/main/java/org/genesys2/client/oauth/HttpRedirectException.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/OAuthAuthenticationException.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/PleaseRetryException.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/api/GenesysApi.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/api/accession/AccessionJson.java
View file @
ed48f4ac
/*
* Copyright 201
8
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/api/accession/Api1Constants.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/api/accession/CollectingJson.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/api/accession/GeoJson.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/api/accession/Remark.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/api/images/RepositoryFile.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/main/java/org/genesys2/client/oauth/api/images/RepositoryImage.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/test/java/org/geneys2/client/oauth/AccessionApiTest.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/test/java/org/geneys2/client/oauth/AccessionImagesTest.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/test/java/org/geneys2/client/oauth/ApiTest.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
@@ -16,23 +16,12 @@
package
org.geneys2.client.oauth
;
import
static
org
.
hamcrest
.
CoreMatchers
.
equalTo
;
import
static
org
.
hamcrest
.
MatcherAssert
.
assertThat
;
import
static
org
.
mockito
.
Matchers
.
anyMapOf
;
import
static
org
.
mockito
.
Matchers
.
anyString
;
import
static
org
.
mockito
.
Matchers
.*;
import
static
org
.
mockito
.
Mockito
.
when
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
com.fasterxml.jackson.annotation.JsonInclude.Include
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.SerializationFeature
;
import
com.fasterxml.jackson.databind.node.ObjectNode
;
import
com.github.scribejava.core.model.Verb
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.genesys2.client.oauth.GenesysApiException
;
...
...
@@ -47,9 +36,13 @@ import org.junit.runner.RunWith;
import
org.mockito.Matchers
;
import
org.mockito.Mock
;
import
org.mockito.MockitoAnnotations
;
import
org.mockito.invocation.InvocationOnMock
;
import
org.mockito.runners.MockitoJUnitRunner
;
import
org.mockito.stubbing.Answer
;
import
com.fasterxml.jackson.annotation.JsonInclude.Include
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.SerializationFeature
;
import
com.fasterxml.jackson.databind.node.ObjectNode
;
import
com.github.scribejava.core.model.Verb
;
/**
* The Class ApiTest.
...
...
@@ -60,9 +53,6 @@ public class ApiTest {
/** The object mapper. */
private
static
ObjectMapper
objectMapper
;
/** The Constant bananaJson. */
private
static
final
String
bananaJson
;
/** The http get mock. */
@Mock
protected
HttpGet
httpGetMock
;
...
...
@@ -80,8 +70,6 @@ public class ApiTest {
objectMapper
.
configure
(
SerializationFeature
.
WRITE_ENUMS_USING_TO_STRING
,
true
);
objectMapper
.
configure
(
SerializationFeature
.
WRITE_EMPTY_JSON_ARRAYS
,
false
);
objectMapper
.
setSerializationInclusion
(
Include
.
NON_NULL
);
bananaJson
=
objectMapper
.
createObjectNode
().
put
(
"shortName"
,
"banana"
).
toString
();
}
/**
...
...
src/test/java/org/geneys2/client/oauth/JsonNodeMatchers.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
src/test/java/org/geneys2/client/oauth/MockGenesysException.java
View file @
ed48f4ac
/*
* Copyright 201
6
Global Crop Diversity Trust
* Copyright 201
9
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.
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment