Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (3)
Fixed the tests to work with Mockito 2.x
· e5c3ab6e
Emmanuel Bourg
authored
Sep 18, 2019
e5c3ab6e
Standards-Version updated to 4.4.0
· b4536220
Emmanuel Bourg
authored
Sep 18, 2019
b4536220
Upload to unstable
· 41fa5dcc
Emmanuel Bourg
authored
Sep 18, 2019
41fa5dcc
Show whitespace changes
Inline
Side-by-side
debian/changelog
View file @
41fa5dcc
oauth-signpost (1.2.1.2-3) unstable; urgency=medium
* Team upload.
* Fixed the tests to work with Mockito 2.x
* Standards-Version updated to 4.4.0
-- Emmanuel Bourg <ebourg@apache.org> Wed, 18 Sep 2019 00:01:24 +0200
oauth-signpost (1.2.1.2-2) unstable; urgency=medium
* Team upload.
...
...
debian/control
View file @
41fa5dcc
...
...
@@ -13,9 +13,9 @@ Build-Depends:
libmaven-antrun-plugin-java,
libmaven-install-plugin-java,
libmaven-resources-plugin-java (>= 2.3),
libmockito-java (>=
1.8.5+ds1-2~
),
libmockito-java (>=
2.0
),
maven-debian-helper
Standards-Version: 4.
2.1
Standards-Version: 4.
4.0
Vcs-Git: https://salsa.debian.org/java-team/oauth-signpost.git
Vcs-Browser: https://salsa.debian.org/java-team/oauth-signpost
Homepage: https://github.com/mttkay/signpost
...
...
debian/patches/01-mockito-compatibility.patch
0 → 100644
View file @
41fa5dcc
Description: Fixes the compatibility with the version of Mockito in Debian
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/signpost-core/src/test/java/oauth/signpost/OAuthConsumerTest.java
+++ b/signpost-core/src/test/java/oauth/signpost/OAuthConsumerTest.java
@@ -102,8 +102,7 @@
// verify that all custom params are properly read and passed to the
// message signer
ArgumentMatcher<HttpParameters> hasAllParameters = new ArgumentMatcher<HttpParameters>() {
- public boolean matches(Object argument) {
- HttpParameters params = (HttpParameters) argument;
+ public boolean matches(HttpParameters params) {
assertEquals("1 1", params.getFirst("a", true));
assertEquals("2 2", params.getFirst("b", true));
assertEquals("http://example.com", params.getFirst("realm", true));
@@ -136,8 +135,7 @@
// verify that all custom params are properly read and passed to the
// message signer
ArgumentMatcher<HttpParameters> hasParameters = new ArgumentMatcher<HttpParameters>() {
- public boolean matches(Object argument) {
- HttpParameters params = (HttpParameters) argument;
+ public boolean matches(HttpParameters params) {
assertEquals("http://mycallback", params.getFirst("oauth_callback"));
assertEquals("1", params.getFirst("a"));
return true;
@@ -237,11 +235,10 @@
// argThat(new IsCompleteListOfOAuthParameters()));
// }
- private class IsCompleteListOfOAuthParameters extends ArgumentMatcher<String> {
+ private class IsCompleteListOfOAuthParameters implements ArgumentMatcher<String> {
@Override
- public boolean matches(Object argument) {
- String oauthHeader = (String) argument;
+ public boolean matches(String oauthHeader) {
assertTrue(oauthHeader.startsWith("OAuth "));
assertAllOAuthParametersExist(OAuth.oauthHeaderToParamsMap(oauthHeader));
return true;
@@ -258,11 +255,10 @@
assertNotNull(params.getFirst("oauth_version"));
}
- private class HasValuesPercentEncoded extends ArgumentMatcher<String> {
+ private class HasValuesPercentEncoded implements ArgumentMatcher<String> {
@Override
- public boolean matches(Object argument) {
- String oauthHeader = (String) argument;
+ public boolean matches(String oauthHeader) {
HttpParameters params = OAuth.oauthHeaderToParamsMap(oauthHeader);
assertEquals("1%252", params.getFirst("oauth_consumer_key"));
assertEquals("3%204", params.getFirst("oauth_token"));
debian/patches/series
0 → 100644
View file @
41fa5dcc
01-mockito-compatibility.patch