[Git][java-team/oauth-signpost][master] 3 commits: Fixed the tests to work with Mockito 2.x

Emmanuel Bourg gitlab at salsa.debian.org
Tue Sep 17 23:05:35 BST 2019



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / oauth-signpost


Commits:
e5c3ab6e by Emmanuel Bourg at 2019-09-17T22:00:55Z
Fixed the tests to work with Mockito 2.x

- - - - -
b4536220 by Emmanuel Bourg at 2019-09-17T22:01:05Z
Standards-Version updated to 4.4.0

- - - - -
41fa5dcc by Emmanuel Bourg at 2019-09-17T22:01:38Z
Upload to unstable

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/01-mockito-compatibility.patch
- + debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+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 at apache.org>  Wed, 18 Sep 2019 00:01:24 +0200
+
 oauth-signpost (1.2.1.2-2) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -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,0 +1,53 @@
+Description: Fixes the compatibility with the version of Mockito in Debian
+Author: Emmanuel Bourg <ebourg at 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,0 +1 @@
+01-mockito-compatibility.patch



View it on GitLab: https://salsa.debian.org/java-team/oauth-signpost/compare/781ee00bbfe6cf2dcaf3566c646ab605815ad7d4...41fa5dccc167887dd7c3a9c8ee4a5c652383ee96

-- 
View it on GitLab: https://salsa.debian.org/java-team/oauth-signpost/compare/781ee00bbfe6cf2dcaf3566c646ab605815ad7d4...41fa5dccc167887dd7c3a9c8ee4a5c652383ee96
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190917/91c01796/attachment.html>


More information about the pkg-java-commits mailing list