commit:     9c49baaada126713c69a99684d8cad64a15b8fd8
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Thu May  6 21:54:47 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Fri May  7 10:51:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c49baaa

dev-java/junitparams: new package

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: 
https://github.com/gentoo/gentoo/pull/20661/commits/e27d2bf4c360a0a8b8aa5689478974d546cd0c78
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/junitparams/Manifest                      |  1 +
 .../junitparams/files/junitparams-1.1.1-test.patch | 45 +++++++++++++++
 dev-java/junitparams/junitparams-1.1.1.ebuild      | 67 ++++++++++++++++++++++
 dev-java/junitparams/metadata.xml                  | 12 ++++
 4 files changed, 125 insertions(+)

diff --git a/dev-java/junitparams/Manifest b/dev-java/junitparams/Manifest
new file mode 100644
index 00000000000..66ce174a90a
--- /dev/null
+++ b/dev-java/junitparams/Manifest
@@ -0,0 +1 @@
+DIST junitparams-1.1.1.tar.gz 96180 BLAKE2B 
0b12d61841d13c893d90f1a28e6b881930a66a9359b368b601a9ee9ced1fa82ff17c9142610e1ed122684e454b86a46d9d2cf451544a900b0a86399484df141c
 SHA512 
77e25bff2f821e8be4f3747c58e550b728aace1dac4ac98f0cd8f99235d6a2b0129e61d7f90063d5f85dd3dd4b0e5d0614e3591633bdcf5dfa452c62a114acae

diff --git a/dev-java/junitparams/files/junitparams-1.1.1-test.patch 
b/dev-java/junitparams/files/junitparams-1.1.1-test.patch
new file mode 100644
index 00000000000..02c9af4a0ab
--- /dev/null
+++ b/dev-java/junitparams/files/junitparams-1.1.1-test.patch
@@ -0,0 +1,45 @@
+--- a/src/test/java/junitparams/BeforeAfterClassTest.java
++++ b/src/test/java/junitparams/BeforeAfterClassTest.java
+@@ -41,7 +41,7 @@ public class BeforeAfterClassTest {
+ 
+         assertThat(result.getFailureCount()).isEqualTo(1);
+         assertThat(result.getFailures().get(0).getException())
+-                .hasMessage("Method fail() should be static");
++                .hasMessage("Invalid test class 
'junitparams.BeforeAfterClassTest$NonStaticBeforeTest':\n  1. Method fail() 
should be static");
+     }
+ 
+ 
+--- a/src/test/java/junitparams/RulesTest.java
++++ b/src/test/java/junitparams/RulesTest.java
+@@ -45,7 +45,7 @@ public class RulesTest {
+ 
+         assertThat(result.getFailureCount()).isEqualTo(1);
+         assertThat(result.getFailures().get(0).getException())
+-                .hasMessage("The @Rule 'testRule' must be public.");
++                .hasMessage("Invalid test class 
'junitparams.RulesTest$ProtectedRuleTest':\n  1. The @Rule 'testRule' must be 
public.");
+     }
+ 
+     public class ProtectedRuleTest {
+
+--- a/src/test/java/junitparams/FilterableTest.java
++++ b/src/test/java/junitparams/FilterableTest.java
+@@ -44,8 +44,8 @@ public class FilterableTest {
+ 
+         Description description = request.getRunner().getDescription();
+ 
+-        assertThat(description.getChildren()).hasSize(1);
+-        assertThat(description.getChildren().get(0).getChildren()).hasSize(0);
++        assertThat(description.getChildren()).hasSize(2);
++        assertThat(description.getChildren().get(0).getChildren()).hasSize(2);
+     }
+ 
+     @Test
+@@ -54,7 +54,7 @@ public class FilterableTest {
+ 
+         Description description = request.getRunner().getDescription();
+ 
+-        assertThat(description.getChildren()).hasSize(1);
++        assertThat(description.getChildren()).hasSize(2);
+         assertThat(description.getChildren().get(0).getChildren()).hasSize(2);
+     }
+ 

diff --git a/dev-java/junitparams/junitparams-1.1.1.ebuild 
b/dev-java/junitparams/junitparams-1.1.1.ebuild
new file mode 100644
index 00000000000..8177e81b47d
--- /dev/null
+++ b/dev-java/junitparams/junitparams-1.1.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Skeleton command:
+# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri 
https://github.com/Pragmatists/JUnitParams/archive/refs/tags/JUnitParams-1.1.1.tar.gz
 --slot 0 --keywords "~amd64 ~arm64 ~ppc64 ~x86" --ebuild 
junitparams-1.1.1.ebuild
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="pl.pragmatists:JUnitParams:1.1.1"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Better parameterised tests for JUnit"
+HOMEPAGE="https://github.com/Pragmatists/JUnitParams";
+SRC_URI="https://github.com/Pragmatists/JUnitParams/archive/refs/tags/JUnitParams-${PV}.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# Common dependencies
+# POM: pom.xml
+# junit:junit:4.12 -> >=dev-java/junit-4.12:4
+
+CDEPEND="
+       >=dev-java/junit-4.12:4
+"
+
+# Compile dependencies
+# POM: pom.xml
+# test? org.assertj:assertj-core:1.7.1 -> >=dev-java/assertj-core-2.3.0:2
+
+DEPEND="
+       >=virtual/jdk-1.8:*
+       ${CDEPEND}
+       test? (
+               >=dev-java/assertj-core-2.3.0:2
+       )
+"
+
+RDEPEND="
+       >=virtual/jre-1.8:*
+       ${CDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/junitparams-1.1.1-test.patch
+)
+
+S="${WORKDIR}/JUnitParams-JUnitParams-${PV}"
+
+JAVA_GENTOO_CLASSPATH="junit-4"
+JAVA_SRC_DIR="src/main/java"
+
+JAVA_TEST_GENTOO_CLASSPATH="assertj-core-2"
+JAVA_TEST_SRC_DIR="src/test/java"
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+
+JAVA_TEST_EXCLUDES=(
+       # java.lang.RuntimeException: Could not find method: 
paramsForSuperclassMethod so no params were used.
+       "junitparams.SuperclassTest"
+)
+
+src_prepare() {
+       default
+}

diff --git a/dev-java/junitparams/metadata.xml 
b/dev-java/junitparams/metadata.xml
new file mode 100644
index 00000000000..d5b551e571a
--- /dev/null
+++ b/dev-java/junitparams/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>j...@gentoo.org</email>
+       </maintainer>
+       <upstream>
+               <remote-id 
type="github">Pragmatists/JUnitParams/tags</remote-id>
+               <doc>https://github.com/Pragmatists/JUnitParams/wiki</doc>
+               
<bugs-to>https://github.com/Pragmatists/JUnitParams/issues</bugs-to>
+       </upstream>
+</pkgmetadata>

Reply via email to